3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['name' => 'Mathmatics', 'time' => '03:01:PM - 04:50:PM'], ['name' => 'History', 'time' => '11:30:AM - 01:30:PM'], ['name' => 'French', 'time' => '01:31:PM - 03:00:PM'], ]; usort($arr,function($a,$b){ $dta = DateTime::createFromFormat('h:i:A',substr($a['time'],0,8)); $dtb = DateTime::createFromFormat('h:i:A',substr($b['time'],0,8)); return $dta <=> $dtb; }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [name] => History [time] => 11:30:AM - 01:30:PM ) [1] => Array ( [name] => French [time] => 01:31:PM - 03:00:PM ) [2] => Array ( [name] => Mathmatics [time] => 03:01:PM - 04:50:PM ) )

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