From: uwendel at mysql dot com Operating system: Linux PHP version: 5.3CVS-2008-02-19 (CVS) PHP Bug Type: PDO related Bug description: Is PDO::getAvailableDrivers() really static?
Description: ------------ According to the manual, the PDO method getAvailableDrivers() is static: "This function returns all currently available PDO drivers which can be used in DSN parameter of PDO->__construct(). This is a static method.", http://de.php.net/manual/en/function.PDO-getAvailableDrivers.php That's not true. You can invoke it using static and non-static syntax. I'd call it a feature not a bug. In any case it should be documented. Reproduce code: --------------- [EMAIL PROTECTED]:~/php53> sapi/cli/php -r '$pdo=new PDO("sqlite:/tmp/foo.db"); var_dump($pdo->getAvailableDrivers()); var_dump(PDO::getAvailableDrivers());' array(4) { [0]=> string(7) "sqlite2" [1]=> string(6) "sqlite" [2]=> string(5) "pgsql" [3]=> string(5) "mysql" } array(4) { [0]=> string(7) "sqlite2" [1]=> string(6) "sqlite" [2]=> string(5) "pgsql" [3]=> string(5) "mysql" } Expected result: ---------------- I'm fine with the implementation, no change. But decide on the question if its a feature or a bug. -- Edit bug report at http://bugs.php.net/?id=44167&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44167&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44167&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44167&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44167&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44167&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44167&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44167&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44167&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44167&r=support Expected behavior: http://bugs.php.net/fix.php?id=44167&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44167&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44167&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44167&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44167&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44167&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44167&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44167&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44167&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44167&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44167&r=mysqlcfg
