3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($var) { echo "Test: \$var == $var\n"; } class foo { public $arr = array("test"); function bar() { ($this)->arr[0]('some value'); } } (new foo)->bar();
based on dXNJY
Output for 7.0.0 - 7.1.7, 7.2.0
Test: $var == some value
Output for 7.1.10

Process exited with code 137.
Output for 5.4.11 - 5.6.21
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/4bju6 on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/4bju6 on line 12
Process exited with code 255.