3v4l.org

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