3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(ordered_combinations(Array("one", "two", "three", "four"))); function ordered_combinations($array){ if(is_array($array)){ while(count($array) > 0){ foreach($array as $element){ $string = $string . " " . $element; $output[] = $string; } $string = ""; array_shift($array); } return $output; } }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $string in /in/iTQmF on line 9 Array ( [0] => one [1] => one two [2] => one two three [3] => one two three four [4] => two [5] => two three [6] => two three four [7] => three [8] => three four [9] => four )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
66.76 ms | 401 KiB | 8 Q