3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime(); $date->setTimezone(new \DateTimeZone('UTC')); $test = strtotime($date->format('Y-m-d') . '00:00:00'); $datee = new \DateTime(); $datee->setTimezone(new \DateTimeZone('UTC')); $testt = strtotime($datee->format('Y-m-d') . '23:59:59'); echo date('Y-m-d H:i:s', $test); echo date('Y-m-d H:i:s', $testt);

preferences:
39.16 ms | 402 KiB | 5 Q