3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php $array = array( array( "location" => array("street_name" => "Derby Road"), "info" => array("status" => "available"), "specs" => array("bedroom_number" => "7") ), array( "location" => array("street_name" => "Derby Road"), "info" => array("status" => "let"), "specs" => array("bedroom_number" =>"5") ), array( "location" => array("street_name" => "Derby Road"), "info" => array("status" => "let"), "specs" => array("bedroom_number" =>"7") ), array( "location" => array("street_name" => "Derby Road"), "info" => array("status" => "available"), "specs" => array("bedroom_number" =>"5") ), array( "location" => array("street_name" => "Derby Road"), "info" => array("status" => "available"), "specs" => array("bedroom_number" =>"7") ) ); function cmp($a, $b) { if ($a["specs"]["bedroom_number"] === $b["specs"]["bedroom_number"]) { return ($a["info"]["status"] !== "let") ? -1 : 1; } return ($a["specs"]["bedroom_number"] > $b["specs"]["bedroom_number"]) ? -1 : 1; } usort($array, "cmp"); var_dump($array);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.00.0030.04320.05
5.6.160.0070.06320.50
5.6.150.0130.06018.12
5.6.140.0170.07018.26
5.6.130.0070.08018.18
5.6.120.0100.05321.14
5.6.110.0100.06721.13
5.6.100.0030.08721.08
5.6.90.0100.06720.94
5.6.80.0100.07720.37
5.5.300.0130.05718.03
5.5.290.0070.04717.95
5.5.280.0100.08020.84
5.5.270.0070.07320.76
5.5.260.0100.06720.88
5.5.250.0200.07720.79
5.5.240.0170.04320.21

preferences:
140.96 ms | 1394 KiB | 7 Q