Edit report at https://bugs.php.net/bug.php?id=55311&edit=1
ID: 55311 Updated by: larue...@php.net Reported by: steve at twitpic dot com Summary: Static methods invoke __call when called from within class -Status: Open +Status: Verified Type: Bug Package: *General Issues Operating System: Ubuntu 11.04 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: looks like for some reason someone change the if/else sequence make this bug, but I am not sure why he do this. Previous Comments: ------------------------------------------------------------------------ [2011-07-28 21:04:42] steve at twitpic dot com Description: ------------ When calling a non-existant static method within an objects method, php invokes _call instead of __callStatic. When calling the same non-existant static method outside of the object, php correctly invokes __callStatic. It appears that this broke in php5.3.5 and is still broken in 5.3.6. It works as expected in 5.3.3, however. Test script: --------------- class Test { public function __call($method, $args) { echo "call\n"; } public static function __callStatic($method, $args) { echo "callStatic\n"; } public function testing() { Test::fakeFunction(); } } $t = new Test; $t->testing(); Test::fakeFunction(); Expected result: ---------------- // expected output callStatic callStatic Actual result: -------------- // output call callStatic ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55311&edit=1