3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items[] = array("apple", "green", 5.13); $items[] = array("banana", "green", 5.03); $items[] = array("banana", "yellow", 6.13); $items[] = array("apple", "red", 7.13); function sortByOrder($a, $b) { if($a[2] == $b[2]) { return 0; } else { return ($a[2] > $b[2]) ? +1 : -1; } } usort($items, 'sortByOrder'); foreach ($items as $item) { echo "$item[2] : $item[0] - $item[1]\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
5.03 : banana - green 5.13 : apple - green 6.13 : banana - yellow 7.13 : apple - red

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:
44.95 ms | 401 KiB | 8 Q