3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sortByTime($a, $b) { if ($a->time == $b->time) { return 0; } return ($a->time < $b->time) ? -1 : 1; } $a = json_decode('[{"id": 111,"time": 123123123,"data": "testc"},{ "id":200 ,"time":433123123,"data":"testb"},{"id":300,"time":33123123,"data":"testb"}]'); usort($a, "sortByTime"); print_r($a);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => stdClass Object ( [id] => 300 [time] => 33123123 [data] => testb ) [1] => stdClass Object ( [id] => 111 [time] => 123123123 [data] => testc ) [2] => stdClass Object ( [id] => 200 [time] => 433123123 [data] => testb ) )

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:
80.63 ms | 406 KiB | 5 Q