3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(...$args) { var_dump($args); } function gen() { yield 1.23 => 123; } foo(...gen());
Output for 7.3.0
Fatal error: Uncaught Error: Cannot unpack Traversable with non-integer keys in /in/Un8Tq:9 Stack trace: #0 {main} thrown in /in/Un8Tq on line 9
Process exited with code 255.
Output for 5.6.0 - 5.6.38, 7.0.0 - 7.2.13
array(1) { [0]=> int(123) }
Output for hhvm-3.22.0
Warning: Only containers may be unpacked in /in/Un8Tq on line -1 array(0) { }
Output for hhvm-3.10.1 - 3.21.3
Warning: Only containers may be unpacked in /in/Un8Tq on line 9 array(0) { }
Output for 5.4.0 - 5.5.38
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/Un8Tq on line 3
Process exited with code 255.
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '.', expecting '&' or T_VARIABLE in /in/Un8Tq on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected '.', expecting '&' or T_VARIABLE in /in/Un8Tq on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '.', expecting ')' in /in/Un8Tq on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '.', expecting ')' in /in/Un8Tq on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/Un8Tq on line 3
Process exited with code 255.