3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr[] = array('name'=>'test1', 'age'=>25); $arr[] = array('name'=>'test2', 'age'=>22); $arr[] = array('name'=>'test3', 'age'=>23); $arr[] = array('name'=>'test4', 'age'=>29); usort($arr, "cmp"); // USORT print_r($arr); function cmp($a, $b) { if ($a['age']==$b['age']) return 0; return ($a['age']<$b['age'])?-1:1; }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [name] => test2 [age] => 22 ) [1] => Array ( [name] => test3 [age] => 23 ) [2] => Array ( [name] => test1 [age] => 25 ) [3] => Array ( [name] => test4 [age] => 29 ) )

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