3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "Negative numbers\n"; $negative = array('-5','3','-2','0','-1000','9','1'); print_r($negative); natsort($negative); print_r($negative); ?>
Output for 4.3.0 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Negative numbers Array ( [0] => -5 [1] => 3 [2] => -2 [3] => 0 [4] => -1000 [5] => 9 [6] => 1 ) Array ( [2] => -2 [0] => -5 [4] => -1000 [3] => 0 [6] => 1 [1] => 3 [5] => 9 )