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("one","two","three","four"),array("one","two","three","four"));
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
Parse error: syntax error, unexpected ';' in /in/FWeHI on line 15
Process exited with code 255.

preferences:
184.69 ms | 1387 KiB | 58 Q