3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits[0]["expiryDate"] = "20142646"; $fruits[1]["expiryDate"] = "20142643"; $fruits[2]["expiryDate"] = "201426445"; usort($fruits, "compareDates"); print_r($fruits); function compareDates($a, $b) { $t1 = strtotime($a['expiryDate']); $t2 = strtotime($b['expiryDate']); if ( $t1 == $t2) { return 0; } return ( $t1 > $t2) ? +1 : -1; }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [expiryDate] => 20142646 ) [1] => Array ( [expiryDate] => 20142643 ) [2] => Array ( [expiryDate] => 201426445 ) )

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:
37.92 ms | 401 KiB | 8 Q