Taking it to a better solution is that the method sqliteCreateFunction shouldn't exist on the PDO class, but instead on a PDOSqlite that extends PDO.class PDOSqlite extends PDO { public function createFunction(...) {...} } class PDO { public static function connect(string $dsn [, string $username [, string $password [, array $options ]]]) { // if connecting to SQLite DB { return new PDOSqlite(...); } } } This might be a mistake in how it was implemented originally. Looking back it seems that it was implemented before we had the RFC process....and is exactly the type of 'sub-optimal' implementation the RFC process is meant to prevent.
Yes I do agree that the method overloading of PDO by drivers is not the best to say the least.
If you feel like rewriting a large part of PDO feel free :) but I don't have time for that, and it's not the subject of this RFC :)
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
