3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x[] = 0.; $x[] = 1.; $x[] = -1.; $x[] = INF; $x[] = -INF; sort($x); print_r($x);
based on Ib2rM
Output for 4.3.6 - 7.2.0
Array ( [0] => -INF [1] => -1 [2] => 0 [3] => 1 [4] => INF )
Output for 4.3.0 - 4.3.5
Notice: Use of undefined constant INF - assumed 'INF' in /in/BKOUs on line 6 Notice: Use of undefined constant INF - assumed 'INF' in /in/BKOUs on line 7 Array ( [0] => -1 [1] => 0 [2] => INF [3] => 0 [4] => 1 )