--TEST-- Bug #45186 (__call depends on __callstatic in class scope) --FILE-- test(); call_user_func(array('BAR','x')); call_user_func('BAR::www'); try { call_user_func('self::y'); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- __call: string(3) "ABC" __call: string(3) "ABC" __call: string(3) "xyz" __call: string(3) "www" __call: string(1) "y" __call: string(1) "y" ok __callstatic: string(3) "www" call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active