3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($var="default string\n") { echo "Test $var\n"; } class foo { var $arr = ["test"]; function bar() { ($this->arr[0])(); } } (new foo)->bar();
based on FZ4P8
Output for 7.0.0 - 7.2.0
Test default string
Output for 5.4.11 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/iOC3L on line 13
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/iOC3L on line 10
Process exited with code 255.