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"; } } } $input[] = 15.2; $input[] = 15.2; $input[] = 15.2; permutation($input);

preferences:
41.02 ms | 402 KiB | 5 Q