3v4l.org

run code in 300+ PHP versions simultaneously
<?php function permutation(array $arr) { while($ele=array_shift($arr)) { $x=$ele; echo $x."\n"; foreach($arr as $rest) { $x.=" $rest"; echo $x."\n"; } } } permutation=array(array('red', 'blue', 'green'),array('small', 'med', 'large'),array('car', 'truck', 'van'));
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '=' in /in/OKdCJ on line 15
Process exited with code 255.

preferences:
183.35 ms | 1395 KiB | 58 Q