3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { function bar() { echo 'baz'; } } call_user_func('foo::bar');
Output for 7.0.0 - 7.1.0
Deprecated: Non-static method foo::bar() should not be called statically in /in/8REtZ on line 10 baz
Output for hhvm-3.10.0 - 3.12.0
baz
Output for 5.3.0 - 5.6.28
Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method foo::bar() should not be called statically in /in/8REtZ on line 10 baz
Output for 4.3.2 - 5.2.17
Warning: call_user_func(foo::bar): First argument is expected to be a valid callback in /in/8REtZ on line 10
Output for 4.3.0 - 4.3.1
Warning: call_user_func(foo::bar) [http://www.php.net/function.call-user-func]: First argument is expected to be a valid callback in /in/8REtZ on line 10