3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function myFunction(string ...$str) { return $str; } var_dump( myFunction('test'));
based on pX1SH
Output for 7.0.0 - 7.2.0
array(1) { [0]=> string(4) "test" }
Output for 5.6.7 - 5.6.28
Catchable fatal error: Argument 1 passed to myFunction() must be an instance of string, string given, called in /in/bklHB on line 8 and defined in /in/bklHB on line 3
Process exited with code 255.
Output for 5.4.2 - 5.5.35
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/bklHB on line 3
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '.', expecting '&' or T_VARIABLE in /in/bklHB on line 3
Process exited with code 255.