3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($var) { echo "Testing: $var\n"; } class foo { var $arr = array("test"); function bar($str) { var_dump($this->arr[0]); ($this->arr[0])($str); } } $foo = new foo; $foo->bar("bla");
based on JpTvT
Output for 7.0.0 - 7.2.0
string(4) "test" Testing: bla
Output for 5.3.21 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/Zo7Yr on line 15
Process exited with code 255.