3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr['i1'] = 99; $arr['i2'] = 89; function cmp($a, $b) { if ($GLOBALS['arr'][$a] > $GLOBALS['arr'][$b]) { return 1; } if ($GLOBALS['arr'][$a] < $GLOBALS['arr'][$b]) { return -1; } return 0; } if (uksort($arr, 'cmp')) { echo "success"; } else { echo "failure"; } print_r($arr);
Output for git.master, git.master_jit
successArray ( [i2] => 89 [i1] => 99 )
Output for rfc.property-hooks
Warning: Undefined array key "i1" in /in/8VI5h on line 11 Warning: Undefined array key "i2" in /in/8VI5h on line 11 Warning: Undefined array key "i1" in /in/8VI5h on line 12 Warning: Undefined array key "i2" in /in/8VI5h on line 12 successArray ( [i1] => 99 [i2] => 89 )

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