3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array( 2.0, NAN, 1.0 ); sort($a); var_dump($a);
based on deK7Y
Output for 7.1.10 - 7.2.0
array(3) { [0]=> float(NAN) [1]=> float(1) [2]=> float(2) }
Output for 7.0.0 - 7.1.7
array(3) { [0]=> float(2) [1]=> float(NAN) [2]=> float(1) }
Output for 5.3.22 - 5.6.28
array(3) { [0]=> float(1) [1]=> float(NAN) [2]=> float(2) }