3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( '100'=>array('age'=>22,'name'=>'jack','date'=>'2014'), '110'=>array('age'=>33,'name'=>'mary','date'=>'2012'), '120'=>array('age'=>24,'name'=>'lilei','date'=>'2015') ); uasort($arr, function($a, $b) { if( $a['age'] === $b['age'] ){ return $a['date'] - $b['date']; } return $a['age'] - $b['age']; }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [100] => Array ( [age] => 22 [name] => jack [date] => 2014 ) [120] => Array ( [age] => 24 [name] => lilei [date] => 2015 ) [110] => Array ( [age] => 33 [name] => mary [date] => 2012 ) )

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