3v4l.org

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