3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL | E_STRICT); class Foo { public static function bar() { echo 'bar', PHP_EOL; } public function baz() { echo 'baz', PHP_EOL; } } $foo = new Foo; $foo->bar(); Foo::baz();
based on o6q7a
Output for 7.0.0 - 7.1.0
bar Deprecated: Non-static method Foo::baz() should not be called statically in /in/H6RUL on line 14 baz
Output for 5.0.2 - 5.6.28
bar Strict Standards: Non-static method Foo::baz() should not be called statically in /in/H6RUL on line 14 baz
Output for 5.0.0 - 5.0.1
bar Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H6RUL on line 7 PHP_EOL Strict Standards: Non-static method Foo::baz() should not be called statically in /in/H6RUL on line 14 baz Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/H6RUL on line 8 PHP_EOL
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/H6RUL on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/H6RUL on line 7
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/H6RUL on line 7
Process exited with code 255.