- reset: documentation ( source)
- end: documentation ( source)
- var_export: documentation ( source)
- strtotime: documentation ( source)
- usort: documentation ( source)
<?php
$dates = array('1-2018','5-2019','10-2018','5-2020','9-1978','6-2001');
usort($dates, function($a,$b){ return strtotime('1-'.$a) <=>strtotime('1-'.$b);});
var_export($dates);
echo "\n";
echo "Min: ".reset($dates)."\n";
echo "Max: ".end($dates)."\n";