3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = "30-12-1999 9:25:52 AM"; sscanf($date, "%d-%d-%d %d:%d:%d %s", $d, $m, $Y, $g, $i, $s, $A); $h = $A == 'AM' ? $g : $g + 12; $date = "$Y-$m-$d $h:$i:$s"; $date = strtotime($date); echo date('H:i:s', $date);
Output for 4.3.0 - 7.1.0
09:25:52