3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo[1]['items'][] = 'Third'; $foo[0]['items'][] = 'Second'; $foo[4]['items'][] = 'Last'; $foo[-1]['items'][] = 'I will be first'; $foo[0]['items'][] = 'Also second'; function cmp($a, $b) { if ($a == $b) { return 0; } return ($a > $b) ? -1 : 1; } usort($foo, "cmp"); echo '<pre>'; var_dump($foo); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>array(4) { [0]=> array(1) { ["items"]=> array(2) { [0]=> string(6) "Second" [1]=> string(11) "Also second" } } [1]=> array(1) { ["items"]=> array(1) { [0]=> string(5) "Third" } } [2]=> array(1) { ["items"]=> array(1) { [0]=> string(4) "Last" } } [3]=> array(1) { ["items"]=> array(1) { [0]=> string(15) "I will be first" } } } </pre>

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