3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $to_date = date('Y-m-t' . ' 00:00:00', mktime(0, 0, 0, date("m")-1 , date("d"), date("Y")));// $from_date = date('Y-m-01' . ' 00:00:00', mktime(0, 0, 0, date("m")-1 , date("d"), date("Y")));// echo $to_date; echo "<br/>"; echo $from_date;
Output for 4.3.0 - 7.2.0
2013-02-28 00:00:00<br/>2013-02-01 00:00:00