3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyClass { function aMethod() { echo "Hello"; } } (new MyClass)->aMethod();
Output for 5.4.25 - 7.2.0
Hello
Output for 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/RRSWd on line 7
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/RRSWd on line 7
Process exited with code 255.