- var_dump: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$ts = ['3:00', '2:30', '12:15', '12:17'];
$s = strtotime('midnight tomorrow')-1;
foreach($ts as $t) {
$t = strtotime($t);
if ($t < $s) {
$s = $t;
}
}
var_dump(date('c', $s));