3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'A' => array(1, 2, 3, 4), 'B' => array(5, 6), 'C' => array('a', 'b', 'c')); $values=""; function makeCombinations($array,$values){ if(is_array($array)) { foreach($array as $value) { makeCombinations($value,$values); } } else { $values.=$array; echo $array."\n"; } return $values; } $values=makeCombinations($array,$values); //echo $values;
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
1 2 3 4 5 6 a b c
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/aqs8B on line 20
Process exited with code 255.