3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = "30-12-1899 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; echo "$Y-$m-$d $h:$i:$s", "\n"; echo "$h:$i:$s", "\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1899-12-30 9:25:52 9:25:52