From: Operating system: Windows 2003 PHP version: 5.4.0 Package: Reproducible crash Bug Type: Bug Bug description:Crash when overloaded method called from class constructor
Description: ------------ If a class overrides a method but with a different signature and that method is called in the constructor and if error_reporting is set to display strict errors and if the classes are defined in reverse order, PHP will crash. In my test script, if class one is defined before class two, PHP won't crash. I realize that overridden methods need to have identical signatures, but I would expect a warning and not a crash. Test script: --------------- error_reporting(-1); class two extends one{ public function __construct(){ $this->error(7); } private function error($n){ echo 'two'; } } class one{ private function error(){ echo 'one'; } } new two; Expected result: ---------------- two Actual result: -------------- FastCGI Error The FastCGI Handler was unable to process the request. Error Details: The FastCGI process exited unexpectedly Error Number: -2147467259 (0x80004005). Error Description: Unspecified error HTTP Error 500 - Server Error. Internet Information Services (IIS) -- Edit bug report at https://bugs.php.net/bug.php?id=61778&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61778&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61778&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61778&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61778&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61778&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61778&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61778&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61778&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61778&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61778&r=support Expected behavior: https://bugs.php.net/fix.php?id=61778&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61778&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61778&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61778&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61778&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61778&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61778&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61778&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61778&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61778&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61778&r=mysqlcfg