3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = [ "first", "second" ]; test($d); echo $d[0]; function test(array $data = []) { printer('string', ...$data); } function printer($string, &$first, &$last) { echo $string . ', ' . $first . ' ' . $last; $first = "changed first"; }
based on BSsdU
Output for 7.0.20 - 7.2.0
string, first secondfirst
Output for 5.6.8 - 7.0.6
string, first secondchanged first
Output for 5.4.1 - 5.5.35
Parse error: syntax error, unexpected '.' in /in/MKt7N on line 12
Process exited with code 255.
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/MKt7N on line 3
Process exited with code 255.