3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arrays = array( array( 'resize', 'width' => 2, 'height' => 3), array( 'resize', 'height' => 3, 'width' => 2), ); foreach($arrays as $array){ ksort($array); echo serialize($array)."\n"; }
based on bsUJS
Output for 7.0.0 - 7.2.0
a:3:{i:0;s:6:"resize";s:6:"height";i:3;s:5:"width";i:2;} a:3:{i:0;s:6:"resize";s:6:"height";i:3;s:5:"width";i:2;}
Output for 4.3.0 - 5.6.28
a:3:{s:6:"height";i:3;s:5:"width";i:2;i:0;s:6:"resize";} a:3:{i:0;s:6:"resize";s:6:"height";i:3;s:5:"width";i:2;}