3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( "texas" => array( "withers field B" => array("name" => "beam pump 3"), "z should go second" => array("name" => "beam pump 2"), "a should go first" => array("name" =>"beam pump 1") ) ); function multiLevelSort($arr) { if (is_array($arr)) { ksort($arr); foreach($arr as $value) { $value = multiLevelSort($value); } } return $arr; } echo("hello"); $test = multiLevelSort($test); echo(var_dump($test)); ?>

preferences:
55.71 ms | 402 KiB | 5 Q