1--TEST-- 2Test calling a PDO sub-class constructor with a different DSN 3--EXTENSIONS-- 4pdo_pgsql 5pdo_sqlite 6--FILE-- 7<?php 8 9try { 10 new Pdo\Pgsql('sqlite::memory:'); 11} catch (PDOException $e) { 12 echo $e->getMessage() . "\n"; 13} 14 15class MyPgsql extends Pdo\Pgsql 16{ 17} 18 19try { 20 new MyPgsql('sqlite::memory:'); 21} catch (PDOException $e) { 22 echo $e->getMessage() . "\n"; 23} 24 25?> 26--EXPECT-- 27Pdo\Pgsql::__construct() cannot be used for connecting to the "sqlite" driver, either call Pdo\Sqlite::__construct() or PDO::__construct() instead 28MyPgsql::__construct() cannot be used for connecting to the "sqlite" driver, either call Pdo\Sqlite::__construct() or PDO::__construct() instead 29