3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('now'); $firstOfMonth = $date->modify('1st day of current month')->format(DATE_ISO8601); $lastOfMonth = $date->modify('end of month')->format(DATE_ISO8601); var_dump(array($firstOfMonth, $lastOfMonth));