3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = '2018-06-08 15:20:30'; $dt = new \DateTimeImmutable($time); $di = new \DateInterval('PT15H20M30S'); echo $dt->format('Y-m-d H:i:s')."\n"; echo $di->format('%H:%I:%s')."\n"; echo strftime('%H:%I:%s', strtotime($time))."\n"; # %I = hodiny (01-12), %s = Unix epoch timestamp echo strftime('%H:%M:%S', strtotime($time));

preferences:
727.48 ms | 405 KiB | 5 Q