3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = time(); $ts = new \DateTime('@1368007801'); echo $ts->format('c') . PHP_EOL; $diff = $now - $ts->getTimestamp(); echo $diff . PHP_EOL; $diffDt = new \DateTime('@' . $diff); echo $diffDt->format('H:i:s');

preferences:
30.65 ms | 402 KiB | 5 Q