3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(): array { return [1, 2, 3, 4]; } list($var1, ...$var2) = foo(); var_dump($var1, $var2, $var3, $var4);
based on mA0kQ
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '...' (T_ELLIPSIS), expecting ',' or ')' in /in/SoDdW on line 7
Process exited with code 255.
Output for 5.3.21 - 5.6.17
Parse error: syntax error, unexpected ':', expecting '{' in /in/SoDdW on line 3
Process exited with code 255.