3v4l.org

run code in 500+ PHP versions simultaneously
<?php $temp = array("one","two","three","four","five"); $arrayResult = array(); for($i = 0; $i< count($temp); $i++){ for($j = 0; $j< count($temp) - $i; $j++){ $tempArr = $temp; $newArray[$i+1] = '*'; array_splice($tempArr,$j, $i+1,$newArray); $arrayResult [] = $tempArr; } } print_r($arrayResult);
Output for rfc.property-hooks, git.master, git.master_jit
Array ( [0] => Array ( [0] => * [1] => two [2] => three [3] => four [4] => five ) [1] => Array ( [0] => one [1] => * [2] => three [3] => four [4] => five ) [2] => Array ( [0] => one [1] => two [2] => * [3] => four [4] => five ) [3] => Array ( [0] => one [1] => two [2] => three [3] => * [4] => five ) [4] => Array ( [0] => one [1] => two [2] => three [3] => four [4] => * ) [5] => Array ( [0] => * [1] => * [2] => three [3] => four [4] => five ) [6] => Array ( [0] => one [1] => * [2] => * [3] => four [4] => five ) [7] => Array ( [0] => one [1] => two [2] => * [3] => * [4] => five ) [8] => Array ( [0] => one [1] => two [2] => three [3] => * [4] => * ) [9] => Array ( [0] => * [1] => * [2] => * [3] => four [4] => five ) [10] => Array ( [0] => one [1] => * [2] => * [3] => * [4] => five ) [11] => Array ( [0] => one [1] => two [2] => * [3] => * [4] => * ) [12] => Array ( [0] => * [1] => * [2] => * [3] => * [4] => five ) [13] => Array ( [0] => one [1] => * [2] => * [3] => * [4] => * ) [14] => Array ( [0] => * [1] => * [2] => * [3] => * [4] => * ) )

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:
49.22 ms | 1717 KiB | 4 Q