3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = array( '2:00pm', '7:30pm', '8:00pm', ); //sort($times); //print_r($times); $results = array(array()); foreach ($times as $time_range) { foreach ($results as $combination) { array_push($results, array_merge(array($time_range), $combination)); } } //sort($results); array_multisort($results); print_r($results);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( ) [1] => Array ( [0] => 2:00pm ) [2] => Array ( [0] => 7:30pm ) [3] => Array ( [0] => 8:00pm ) [4] => Array ( [0] => 7:30pm [1] => 2:00pm ) [5] => Array ( [0] => 8:00pm [1] => 2:00pm ) [6] => Array ( [0] => 8:00pm [1] => 7:30pm ) [7] => Array ( [0] => 8:00pm [1] => 7:30pm [2] => 2:00pm ) )

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:
58.43 ms | 402 KiB | 8 Q