3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array(7, NAN, 4, 3, 2, 5, 6); sort($arr); print_r($arr);
based on 0BSB2
Output for 7.1.10 - 7.2.0
Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => NAN [6] => 7 )
Output for 7.0.0 - 7.1.7
Array ( [0] => 7 [1] => NAN [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 )
Output for 5.3.21 - 5.6.28
Array ( [0] => 2 [1] => 3 [2] => 5 [3] => 6 [4] => NAN [5] => 4 [6] => 7 )