3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array(7, NAN, 3, 2, 18); $result = sort($arr); var_dump($result); var_dump($arr);
based on kmA5L
Output for 7.1.10 - 7.2.0
bool(true) array(5) { [0]=> int(2) [1]=> float(NAN) [2]=> int(3) [3]=> int(7) [4]=> int(18) }
Output for 7.0.0 - 7.1.7
bool(true) array(5) { [0]=> int(7) [1]=> float(NAN) [2]=> int(2) [3]=> int(3) [4]=> int(18) }
Output for 5.5.0 - 5.6.28
bool(true) array(5) { [0]=> int(2) [1]=> int(3) [2]=> int(18) [3]=> float(NAN) [4]=> int(7) }