3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rangeEnd = date("Y-m-d 23:59:59", strtotime("last month")); $rangeStart = date("Y-m-d 00:00:00", strtotime($rangeEnd." -6 days")); echo $rangeStart." - ".$rangeEnd; ?>
Output for 4.3.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2014-05-26 00:00:00 - 2014-06-01 23:59:59
Output for 4.3.0 - 4.3.5
2014-06-03 00:00:00 - 2014-06-01 23:59:59