3v4l.org

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