3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function is_sorted($array) { $n = count($array); for ($a=0; $a<$n-1; $a++) { for ($b=$a+1; $b<$n; $b++) { if ($array[$a] > $array[$b]) { return false; } } } return true; } $array = array(INF, array(), (object)array()); sort($array); var_dump(is_sorted($array)) ?>
Output for 7.0.0 - 7.2.0
Notice: Object of class stdClass could not be converted to float in /in/g3YuH on line 7 bool(false)
Output for 5.3.20 - 5.6.28
Notice: Object of class stdClass could not be converted to double in /in/g3YuH on line 7 bool(false)