<?php
class c {
public static function testCallable()
{
$callable = 'self::test';
call_user_func($callable);
}
public static function test()
{
echo "I WORKED";
}
}
c::testCallable();
Fatal error: Cannot call method self::test() or method does not exist in /in/nZtCX on line 8
Process exited with code 255.
Output for 5.1.2 - 5.1.6, 5.2.0 - 5.2.1
Warning: call_user_func(self::test): Unable to call self::test() in /in/nZtCX on line 8
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.1
Warning: call_user_func(self::test): First argument is expected to be a valid callback in /in/nZtCX on line 8
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/nZtCX on line 4
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/nZtCX on line 4
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/nZtCX on line 4
Process exited with code 255.