3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = array( "texas" => array( "withers field" => array("name" => "beam pump 1"), "withers field B" => array("name" => "beam pump 1") ) ); function multiLevelSort($arr) { if (!is_array($arr)) { return $arr; } else { ksort($arr,SORT_STRING); foreach ($arr as $val) { $val = multiLevelSort($val); } } } echo(multiLevelSort($test)); ?>
based on cQlaC
Output for 4.3.0 - 7.2.0