3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(...$data){ var_dump($data); } test(...(function(){ yield 0; yield 1; yield 2; yield 3; yield 4; })());
based on ZS7mV
Output for 7.0.0 - 7.2.6
array(5) { [0]=> int(0) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(4) }
Output for 5.6.0 - 5.6.28
Parse error: syntax error, unexpected '(', expecting ',' or ')' in /in/7i47p on line 13
Process exited with code 255.
Output for 5.5.0 - 5.5.35
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/7i47p on line 3
Process exited with code 255.