3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array=array("2009-01-01 00:00:00", "2008-01-01 00:00:00", "0000-00-00 00:00:00", "0000-00-00 00:00:00", "0000-00-00 00:00:00", "2006-01-01 00:00:00", "2006-01-01 00:00:00"); print_r($array); sort($array,SORT_STRING); print_r($array); $array=array_reverse($array);
Output for 4.3.0 - 7.1.0
Array ( [0] => 2009-01-01 00:00:00 [1] => 2008-01-01 00:00:00 [2] => 0000-00-00 00:00:00 [3] => 0000-00-00 00:00:00 [4] => 0000-00-00 00:00:00 [5] => 2006-01-01 00:00:00 [6] => 2006-01-01 00:00:00 ) Array ( [0] => 0000-00-00 00:00:00 [1] => 0000-00-00 00:00:00 [2] => 0000-00-00 00:00:00 [3] => 2006-01-01 00:00:00 [4] => 2006-01-01 00:00:00 [5] => 2008-01-01 00:00:00 [6] => 2009-01-01 00:00:00 )