File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 265265 </div>
266266 </div>
267267 <div class="php8-compare">
268- <h2 class="php8-h2" id="new_array_find ">
268+ <h2 class="php8-h2" id="pdo_driver_specific_parsers ">
269269 <?= message ('pdo_driver_specific_parsers_title ' , $ lang ) ?>
270270 <a class="php8-rfc" href="https://wiki.php.net/rfc/pdo_driver_specific_parsers">RFC</a>
271271 </h2>
@@ -276,12 +276,17 @@ PHP
276276 <?php highlight_php_trimmed (
277277 <<<'PHP'
278278$connection = new PDO(
279- 'sqlite:host=localhost;dbname=test ',
279+ 'sqlite:foo.db ',
280280 $username,
281281 $password
282282); // object(PDO)
283283
284- $connection->query('SELECT * FROM foo');
284+ $connection->sqliteCreateFunction(
285+ 'append_php',
286+ static fn($string) => 'PHP ' . $string
287+ );
288+
289+ $connection->query('SELECT append_php(version) FROM php');
285290PHP
286291 ); ?>
287292 </div>
@@ -293,12 +298,17 @@ PHP
293298 <?php highlight_php_trimmed (
294299 <<<'PHP'
295300$connection = PDO::connect(
296- 'sqlite:host=localhost;dbname=test ',
301+ 'sqlite:foo.db ',
297302 $username,
298303 $password
299304); // object(Pdo\Sqlite)
300305
301- $connection->query('SELECT * FROM foo');
306+ $connection->createFunction(
307+ 'append_php',
308+ static fn($string) => 'PHP ' . $string
309+ ); // Does not exist on a mismatching driver.
310+
311+ $connection->query('SELECT append_php(version) FROM php');
302312PHP
303313 ); ?>
304314 </div>
You can’t perform that action at this time.
0 commit comments