3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "30-12-2024", "28-12-2024", "28-12-2024", "28-12-2024", "03-01-2025" ]; usort($arr, function ($a, $b) { return strtotime($a) - strtotime($b); }); print_r($arr);

preferences:
21.91 ms | 406 KiB | 5 Q