3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $end_time = strtotime("Midnight today"); $end_time = strtotime("2015-04-13 00:00:00"); // FOR TESTING $start_time = strtotime("-1 Week",$end_time); $start_date = date("Y-m-d H:i:s",$start_time); $end_date = date("Y-m-d H:i:s",$end_time); echo $start_date . "\n\r"; echo $end_date . "\n\r";
based on OWOfu
Output for 4.3.0 - 7.2.0
2015-04-06 00:00:00 2015-04-13 00:00:00