src/Connection.php
protected function replaceParams(string $query, array $params): string
    {
        $compiler = $this->getCompiler();

        return preg_replace_callback('/\?/', function () use (&$params, $compiler) {
            $param = array_shift($params);
            $param = is_object($param) ? get_class($param) : $param;

            if (is_int($param) || is_float($param)) {
                return $param;
            } elseif ($param === null) {
                return 'NULL';
            } elseif (is_bool($param)) {
                return $param ? 'TRUE' : 'FALSE';
            } else {
                return $compiler->quote($param);
            }
        }, $query);
    }
protected function replaceParams(string $query, array $params): string
    {
        $compiler = $this->getCompiler();

        return preg_replace_callback('/\?/', function () use (&$params, $compiler) {
            $param = array_shift($params);
            $param = is_object($param) ? get_class($param) : $param;

            if (is_int($param) || is_float($param)) {
                return $param;
            } elseif ($param === null) {
                return 'NULL';
            } elseif (is_bool($param)) {
                return $param ? 'TRUE' : 'FALSE';
            } else {
                return $compiler->quote($param);
            }
        }, $query);
    }
protected function replaceParams ( string $ query , array $ params ) : string { $ compiler = $ this -> getCompiler ( ) ; return preg_replace_callback ( '/\?/' , function ( ) use ( & $ params , $ compiler ) { $ param = array_shift ( $ params ) ; $ param = is_object ( $ param ) ? get_class ( $ param ) : $ param ; if ( is_int ( $ param ) || is_float ( $ param ) ) { return $ param ; } elseif ( $ param === null ) { return 'NULL' ; } elseif ( is_bool ( $ param ) ) { return $ param ? 'TRUE' : 'FALSE' ; } else { return $ compiler -> quote ( $ param ) ; } } , $ query ) ; }
Replace placeholders with parameters.

@param   string $query SQL query
@param   array $params Query parameters

@return  string
Replace placeholders with parameters .