ID:               44167
 Updated by:       [EMAIL PROTECTED]
 Reported By:      uwendel at mysql dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         PDO related
 Operating System: Linux
 PHP Version:      5.3CVS-2008-02-19 (CVS)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That's common beahvior of PHP's object model, see also:

class C {
    static function foo() {
        echo "I'm here!";
    }
}

$c = new C();
$c->foo();


Previous Comments:
------------------------------------------------------------------------

[2008-02-19 13:10:41] uwendel at mysql dot com

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 this bug report at http://bugs.php.net/?id=44167&edit=1

Reply via email to