3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'Country' => array( 'United Kingdom' => array( 'London' => array( 0 => 1, 1 => 5, 2 => 23, 3 => 71 ), 'Manchester' => array( 0 => 800 ) ), 'United States' => array( 'New York' => array( 0 => 147, 1 => 111 ), 'Washington' => array( 0 => 213 ), 'Florida' => array( 0 => 6 ), 'Texas' => array( 0 => 9 ) ), 'Brazil' => array( 'Brasília' => array( 0 => 64 ) ) ) ); function ksort_recursive(&$array) { ksort($array); foreach ( $array as &$a ) { is_array($a) && ksort_recursive($a); } } ksort_recursive($data); print_r($data); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [Country] => Array ( [Brazil] => Array ( [Brasília] => Array ( [0] => 64 ) ) [United Kingdom] => Array ( [London] => Array ( [0] => 1 [1] => 5 [2] => 23 [3] => 71 ) [Manchester] => Array ( [0] => 800 ) ) [United States] => Array ( [Florida] => Array ( [0] => 6 ) [New York] => Array ( [0] => 147 [1] => 111 ) [Texas] => Array ( [0] => 9 ) [Washington] => Array ( [0] => 213 ) ) ) )

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:
46.65 ms | 404 KiB | 8 Q