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 4bju6
Output for hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.12
Test: $var == some value
Output for 5.3.21 - 5.6.38
Parse error: syntax error, unexpected '(' in /in/5RWpY on line 12
Process exited with code 255.