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)); ?>
Output for git.master, git.master_jit, rfc.property-hooks
helloarray(1) { ["texas"]=> array(3) { ["withers field B"]=> array(1) { ["name"]=> string(11) "beam pump 3" } ["z should go second"]=> array(1) { ["name"]=> string(11) "beam pump 2" } ["a should go first"]=> array(1) { ["name"]=> string(11) "beam pump 1" } } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.79 ms | 402 KiB | 8 Q