Skip to content

Commit

Permalink
Add PDO Driver specific SQL parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
saundefined committed Oct 15, 2024
1 parent 177c685 commit 712caa3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions releases/8.4/languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
'lazy_objects_title' => 'Lazy Objects',
'dom_additions_html5_title' => 'New ext-dom features and HTML5 support',
'new_array_find_title' => 'New <code>array_*()</code> functions',
'pdo_driver_specific_parsers_title' => 'PDO Driver specific SQL parsers',
'pdo_driver_specific_parsers_description' => 'New subclasses <code>Pdo\Dblib</code>, <code>Pdo\Firebird</code>, <code>Pdo\MySql</code>, <code>Pdo\Odbc</code>, <code>Pdo\Sqlite</code> of <code>PDO</code> are available.',
'new_array_find_description' => 'New functions <code>array_find()</code>, <code>array_find_key</code>, <code>array_any</code>, and <code>array_all</code> are available.',
'new_without_parentheses_title' => 'new MyClass()->method() without parentheses',

Expand Down
44 changes: 44 additions & 0 deletions releases/8.4/release.inc
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,50 @@ PHP
<?= message('new_array_find_description', $lang) ?>
</div>
</div>
<div class="php8-compare">
<h2 class="php8-h2" id="new_array_find">
<?= message('pdo_driver_specific_parsers_title', $lang) ?>
<a class="php8-rfc" href="https://wiki.php.net/rfc/pdo_driver_specific_parsers">RFC</a>
</h2>
<div class="php8-compare__main">
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP &lt; 8.4</div>
<div class="php8-code phpcode">
<?php highlight_php_trimmed(
<<<'PHP'
$connection = new PDO(
'sqlite:host=localhost;dbname=test',
$username,
$password
); // object(PDO)
$connection->query('SELECT * FROM foo');
PHP
); ?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8.4</div>
<div class="php8-code phpcode">
<?php highlight_php_trimmed(
<<<'PHP'
$connection = PDO::connect(
'sqlite:host=localhost;dbname=test',
$username,
$password
); // object(Pdo\Sqlite)
$connection->query('SELECT * FROM foo');
PHP
); ?>
</div>
</div>
</div>
<div class="php8-compare__content">
<?= message('pdo_driver_specific_parsers_description', $lang) ?>
</div>
</div>
<div class="php8-compare">
<h2 class="php8-h2" id="new_without_parentheses">
<?= message('new_without_parentheses_title', $lang) ?>
Expand Down

0 comments on commit 712caa3

Please sign in to comment.