3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class x { function foo() { print "foo"; } function bar() { $x = array(get_class(), "foo"); call_user_func($x); $x(); } } $a = new x; $a->bar(); ?>
Output for 7.0.0 - 7.2.0
foo Deprecated: Non-static method x::foo() should not be called statically in /in/SrG7M on line 10 foo
Output for 5.4.2 - 5.6.28
foo Strict Standards: Non-static method x::foo() should not be called statically in /in/SrG7M on line 10 foo
Output for 5.3.17 - 5.3.29
foo Fatal error: Function name must be a string in /in/SrG7M on line 10
Process exited with code 255.