3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A{ function foo(){ print "foo"; } } print call_user_func('aA::foo');
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'aA' not found in /in/uokkA on line 9
Output for hhvm-3.10.0 - 3.12.0
Warning: Invalid argument: function: class not found in /in/uokkA on line 9
Output for 4.3.2 - 5.2.17
Warning: call_user_func(aA::foo): First argument is expected to be a valid callback in /in/uokkA on line 9
Output for 4.3.0 - 4.3.1
Warning: call_user_func(aA::foo) [http://www.php.net/function.call-user-func]: First argument is expected to be a valid callback in /in/uokkA on line 9