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.4.0 - 5.4.23
Fatal error: Call-time pass-by-reference has been removed in /in/vTXsh on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Deprecated: Call-time pass-by-reference has been deprecated in /in/vTXsh on line 14 Parse error: syntax error, unexpected ';' in /in/vTXsh on line 14
Process exited with code 255.