3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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);
Output for 7.0.0
Parse error: syntax error, unexpected '<', expecting end of file in /in/Bhmjo on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Parse error: syntax error, unexpected '<' in /in/Bhmjo on line 3
Process exited with code 255.