3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $words=array("A", "B", "C", "D"); $combos=array(); print_r(getAllWordCombos($words,$combos, array())); function getAllWordCombos($words, &$combos, $partial) { if (count($words)==1) $combos[]=array_merge($partial,$words); else { foreach ($words as $i=>$first) { $cwords=array_slice($words,0); array_splice($cwords,$i,1); getAllWordCombos($cwords, $combos, array_merge($partial,array($first)); } } }
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected ';' in /in/EIvFg on line 14
Process exited with code 255.