Each PDO driver now has it's own class, extending \PDO, containing (a copy of) driver specific elements
- • Pdo\Dblib, Pdo\Firebird, and Pdo\Odbc are just children, without any changes.
- • Pdo\Mysql has getWarningCount() defined on it
- • Pdo\Pgsql and Pdo\Sqlite have a whole bunch of constants and methods
- • pdo_oci has been moved to PECL: https://github.com/php/pecl-database-pdo_oci
A new factory method, PDO::connect returns an object representing one of the new subclasses:
<?php
$db = PDO::connect('sqlite::memory:');
if (!$db instanceof Pdo\Sqlite) {
*// ERROR ZONE*
}