<?php
class A
{
public function test()
{
return call_user_func('self::stuff');
}
public static function stuff()
{
return 'success';
}
}
$a = new A;
$a->test();
Fatal error: Cannot call method self::stuff() or method does not exist in /in/qPJ5q on line 7
Process exited with code 255.
Output for 5.1.2 - 5.1.6, 5.2.0 - 5.2.1
Warning: call_user_func(self::stuff): Unable to call self::stuff() in /in/qPJ5q on line 7
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.1
Warning: call_user_func(self::stuff): First argument is expected to be a valid callback in /in/qPJ5q on line 7
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/qPJ5q on line 5
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/qPJ5q on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/qPJ5q on line 5
Process exited with code 255.