Edit report at http://bugs.php.net/bug.php?id=54631&edit=1
ID: 54631 Updated by: fel...@php.net Reported by: toolong at mail dot ru Summary: Cannot call constructor -Status: Assigned +Status: Bogus Type: Bug Package: SPL related Operating System: Windows XP PHP Version: 5.3.6 -Assigned To: acurioso +Assigned To: Block user comment: N Private report: N New Comment: Simply do not call the parent constructor whereas SplObjectStorage doesn't have it. Declaring the constructor in the derived class is not the problem. You can reproduce the same error inheriting from an user class without constructor, and trying to call it. Previous Comments: ------------------------------------------------------------------------ [2011-04-29 13:33:52] toolong at mail dot ru Description: ------------ Trying to overload SplObjectStorage __construct(), but got an fatal error: Cannot call constructor Notice that in manual http://php.net/manual/en/class.splobjectstorage.php class SplObjectStorage does not contain constructor, at least public. Test script: --------------- Class Foo extends SplObjectStorage { public function __construct() { parent::__construct(); } } $foo = new Foo(); Expected result: ---------------- It should work Actual result: -------------- Fatal error: Cannot call constructor ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54631&edit=1