@ 2015-12-04T21:57:57Z <?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);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
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).
Version System time (s) User time (s) Memory (MiB) 7.0.0 0.003 0.043 20.05 5.6.16 0.007 0.063 20.50 5.6.15 0.013 0.060 18.12 5.6.14 0.017 0.070 18.26 5.6.13 0.007 0.080 18.18 5.6.12 0.010 0.053 21.14 5.6.11 0.010 0.067 21.13 5.6.10 0.003 0.087 21.08 5.6.9 0.010 0.067 20.94 5.6.8 0.010 0.077 20.37 5.5.30 0.013 0.057 18.03 5.5.29 0.007 0.047 17.95 5.5.28 0.010 0.080 20.84 5.5.27 0.007 0.073 20.76 5.5.26 0.010 0.067 20.88 5.5.25 0.020 0.077 20.79 5.5.24 0.017 0.043 20.21
preferences:dark mode live preview
140.96 ms | 1394 KiB | 7 Q