3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr['i1'] = 99; $arr['i2'] = 89; function cmp($a, $b) { global $arr; if ($arr[$a] > $arr[$b]) { return 1; } if ($arr[$q] < $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/JZlPb on line 12 Warning: Undefined array key "i2" in /in/JZlPb on line 12 Warning: Undefined variable $q in /in/JZlPb on line 13 Warning: Undefined array key "" in /in/JZlPb on line 13 Warning: Undefined array key "i2" in /in/JZlPb on line 13 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:
40.96 ms | 401 KiB | 8 Q