3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $elements = array( array( 'weight' => 100, 'index' => 1, 'html' => 'foo1', ), array( 'weight' => 20, 'index' => 2, 'html' => 'foo2', ), array( 'weight' => 100, 'index' => 3, 'html' => 'foo3', ), ); print_r( $elements ); asort( $elements ); print_r( $elements );
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [weight] => 100 [index] => 1 [html] => foo1 ) [1] => Array ( [weight] => 20 [index] => 2 [html] => foo2 ) [2] => Array ( [weight] => 100 [index] => 3 [html] => foo3 ) ) Array ( [1] => Array ( [weight] => 20 [index] => 2 [html] => foo2 ) [0] => Array ( [weight] => 100 [index] => 1 [html] => foo1 ) [2] => Array ( [weight] => 100 [index] => 3 [html] => foo3 ) )