I have made a Query Builder, (not the full version of it yet) but I wanna ask the if there are someone out there, there can improve this code even more. Will be nice to know so I can code the rest in the better way :)<?phpclass DB {    private static $instance = NULL;    public static function sql(){        self::$instance = new self();        return self::$instance;    }    // These methods set the query clauses    // Use * as default    public function select(string $select_options = *) {        $query_part = SELECT .$select_options;        $this->select = $query_part;        return $this;    }    // From table in DB    public function from(string $from_options) {        $query_part = FROM .$from_options;        $this->from = $query_part;        return $this;    }    // These methods set the query clauses    public function where(string $where_options) {        $query_part = WHERE .$where_options;        $this->where = $query_part;        return $this;    }    // GroupBy    public function groupBy(string $group_options) {        $query_part = groupBy .$group_options;        $this->groupBy = $query_part;        return $this;    }    public function get() {        $array = (array)$this;        $string = implode( , $array);        return $string;    }}And this I how it to call the query builder// Use class DB$query = DB::sql()    ->select()    ->from(CustomerInfo)    ->where(customer_id > 300)    ->get();// Echo resultecho $query;
SQL Query Builder in PHP
php;object oriented;sql
Layout for code:Look at PSR spec: http://www.php-fig.org/psr/psr-2/for comments:https://www.phpdoc.org/docs/latest/getting-started/your-first-set-of-documentation.html#writing-a-docblockFinally is your code testable and possibility to extend without modifying it?Also (static) $instance doesn't feel right to me for some reason, try different name?