|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-30 18:01 UTC] dsp@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
Description: ------------ With a user-defined class that extends PDO, a __call() method does nothing at all. The class behaves as if it didn't exist. I've tested it on a few other internal classes (the xml-related ones) where it works fine, and also with all but the PDO extension disabled with the same result. Reproduce code: --------------- <?php class test extends PDO { function __call($name, array $args) { echo "Called $name in ".__CLASS__.'<br>'; } function foo() { echo "Called foo in ".__CLASS__.'<br>'; } } $a = new test('sqlite::memory:'); $a->foo(); $a->bar(); ?> Expected result: ---------------- "Called foo in test Called bar in test" Actual result: -------------- "Called foo in test Fatal error: Call to undefined method test::bar() in call.php on line 24"