From: d dot khan at ventigo dot com Operating system: Linux (Gentoo) PHP version: 5.0.1 PHP Bug Type: Zend Engine 2 problem Bug description: Constructor isn't called if a class is extended from a built in class
Description: ------------ Hello, maybe this is bogus but I found a situation where the OOP engine doesn't behave as - at least I - would expect. I tried to extend the PDO extension and my local construct method isn't called. The engine always calls the parent construct method. Greetings Daniel Khan Reproduce code: --------------- Class rltxPDO extends PDO { function __construct() { echo 'Called in child'; } public static function instance() { static $instance; if (!$instance) { $instance = new rltxPDO(); } return $instance; } } Expected result: ---------------- Output: Called in child Actual result: -------------- Warning: PDO::__construct() expects at least 1 parameter, 0 given -- Edit bug report at http://bugs.php.net/?id=29780&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29780&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29780&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29780&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29780&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29780&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29780&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29780&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29780&r=support Expected behavior: http://bugs.php.net/fix.php?id=29780&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29780&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29780&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29780&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29780&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29780&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29780&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29780&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29780&r=float