3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'D' => array( 'C' => array('c', 'b', 'a'), 'B' => 'bvalue', 'A' => array('a', 'c', 'b'), ), 'C' => 'cvalue', 'B' => 'bvalue', 'A' => array( 'Z' => 'zvalue', 'A' => 'avalue', 'B' => 'bvalue', ) ); function recursive_ksort(&$array) { foreach ($array as &$v) { if (is_array($v)) { recursive_ksort($v); } } ksort($array); } recursive_ksort($array); var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'A' => array ( 'A' => 'avalue', 'B' => 'bvalue', 'Z' => 'zvalue', ), 'B' => 'bvalue', 'C' => 'cvalue', 'D' => array ( 'A' => array ( 0 => 'a', 1 => 'c', 2 => 'b', ), 'B' => 'bvalue', 'C' => array ( 0 => 'c', 1 => 'b', 2 => 'a', ), ), )

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:
69.56 ms | 406 KiB | 5 Q