3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sortByDate($a, $b) { return strtotime($a) > strtotime($b); } $cont_history = Array ( '20-02-2015' => Array ( 'activity' => 'GATE IN', 'by' => '', 'location' => 'COLOMBO', 'depot' => 'CNLS' ), '15-03-2015' => Array ( 'activity' => 'GATE OUT', 'by' => '', 'location' => 'COLOMBO', 'depot' => 'CNLS' ), '18-03-2015' => Array ( 'activity' => 'GATE IN', 'by' => '', 'location' => 'CHENNAI', 'depot' => 'GOBAL'), '05-04-2015' => Array ( 'activity' => 'GATE OUT', 'by' => '', 'location' => 'CHENNAI', 'depot' => 'GOBAL'), '10-04-2015' => Array ( 'activity' => 'GATE IN', 'by' => '', 'location' => 'MUMBAI', 'depot' => 'CONS' ), '13-05-2015' => Array ( 'activity' => 'GATE OUT', 'by' => '', 'location' => 'MUMBAI', 'depot' => 'CONS' ), '10-02-2015' => Array ( 'activity' => 'Container Bought', 'by' => 'CARU', 'location' => 'COLOMBO', 'depot' => 'CNLS' ), '07-05-2015' => Array ( 'activity' => 'Container Sold', 'by' => 'TCPL', 'location' => 'MUMBAI', 'depot' => 'CONS' ) ); uksort($cont_history, 'sortByDate'); print_r($cont_history);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: uksort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /in/33RZg on line 18 Array ( [10-02-2015] => Array ( [activity] => Container Bought [by] => CARU [location] => COLOMBO [depot] => CNLS ) [20-02-2015] => Array ( [activity] => GATE IN [by] => [location] => COLOMBO [depot] => CNLS ) [15-03-2015] => Array ( [activity] => GATE OUT [by] => [location] => COLOMBO [depot] => CNLS ) [18-03-2015] => Array ( [activity] => GATE IN [by] => [location] => CHENNAI [depot] => GOBAL ) [05-04-2015] => Array ( [activity] => GATE OUT [by] => [location] => CHENNAI [depot] => GOBAL ) [10-04-2015] => Array ( [activity] => GATE IN [by] => [location] => MUMBAI [depot] => CONS ) [07-05-2015] => Array ( [activity] => Container Sold [by] => TCPL [location] => MUMBAI [depot] => CONS ) [13-05-2015] => Array ( [activity] => GATE OUT [by] => [location] => MUMBAI [depot] => CONS ) )

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:
121.75 ms | 409 KiB | 5 Q