- time: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
- date_format: documentation ( source)
<?php
$a = strtotime(date("y-m-d"), time());
$b = (new DateTime())->getTimestamp();
echo date_format("Y-m-d", $a) . "\n";
echo $b . "\n";
echo ($a - $b) . "\n";