3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function tester($a, $b) { var_dump($a, $b); } $arr = ["test" => 1, "test2" => 2]; tester(...$arr);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot unpack array with string keys in /in/jjur8:8 Stack trace: #0 {main} thrown in /in/jjur8 on line 8
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Catchable fatal error: Cannot unpack array with string keys in /in/jjur8 on line 8
Process exited with code 255.
Output for 5.5.24 - 5.5.35
Parse error: syntax error, unexpected '.' in /in/jjur8 on line 8
Process exited with code 255.
Output for 5.4.11 - 5.4.45
Parse error: syntax error, unexpected '.', expecting ')' in /in/jjur8 on line 8
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/jjur8 on line 7
Process exited with code 255.