3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function iterator(...$params) { foreach ($params as $param) { print_r($param); } } iterator(1, ['name'=>'John Doe'], 'Hello world!');
based on Wn76a
Output for 5.6.8 - 7.2.0
1Array ( [name] => John Doe ) Hello world!
Output for 5.4.1 - 5.5.35
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/4PIi2 on line 2
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '.', expecting '&' or T_VARIABLE in /in/4PIi2 on line 2
Process exited with code 255.