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