3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('11-01-2012', '01-01-2014', '01-01-2015', '09-02-2013', '01-01-2013'); function date_sort($a, $b) { return strtotime($a) - strtotime($b); } rsort($arr, "date_sort"); print_r($arr);

preferences:
58.4 ms | 402 KiB | 5 Q