Edit report at http://bugs.php.net/bug.php?id=55020&edit=1
ID: 55020 User updated by: ebert at woltlab dot com Reported by: ebert at woltlab dot com Summary: __callStatic with __call causes crash Status: Bogus Type: Bug Package: Class/Object related Operating System: Windows 7 x64 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Maybe my example wasn't sufficient enough to show the problem, imagine the following code [1] which causes a crash too. I would expect some kind of error handling, instead of PHP just going down. Once again this is related to PHPs "feature" to allow static calls from non-static context and vise versa but this should not cause a crash anyway. http://nopaste.php-quake.net/28028 Previous Comments: ------------------------------------------------------------------------ [2011-06-09 23:42:50] fel...@php.net The crash is caused by call stack overflow due Foo::three() be called with object context, so __call() is called instead of __callStatic(). You just need to make the method 'two' static, so __callStatic() will be called. ------------------------------------------------------------------------ [2011-06-09 21:03:27] ebert at woltlab dot com Description: ------------ PHP crashes if a __call()- and __callStatic()-method exists, whereas __call() redirects calls to __callStatic(), this is likely related to http://bugs.php.net/bug.php?id=49542 System: Microsoft IIS 7.5 PHP 5.3.6 NTS Test script: --------------- Foo-Class (crashes): http://nopaste.php-quake.net/27860 Bar-Class (work-around): http://nopaste.php-quake.net/27861 Expected result: ---------------- // Foo-Class Called static method one() Called static method three() // Bar-Class Called static method one() Called static method three() Actual result: -------------- // Foo-Class PHP-Crash // Bar-Class Called static method one() Called static method three() ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=55020&edit=1