3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { $foo = new foo; return $foo; } var $baz = 1; } var_dump(Foo::bar()->baz);
Output for 7.0.0 - 7.1.0
Deprecated: Non-static method Foo::bar() should not be called statically in /in/okCdf on line 10 int(1)
Output for 5.1.3 - 5.6.28
Strict Standards: Non-static method Foo::bar() should not be called statically in /in/okCdf on line 10 int(1)
Output for 5.0.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/okCdf on line 7 Strict Standards: Non-static method Foo::bar() should not be called statically in /in/okCdf on line 10 int(1)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/okCdf on line 10
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_OBJECT_OPERATOR in /in/okCdf on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/okCdf on line 10
Process exited with code 255.