3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $today_day = 28; $day = date("d-m-Y", mktime(0,0,0,2, $today_day,date("Y"))); $firstday=$day; echo $day ."\n"; $today_day++; $day = date("d-m-Y", mktime(0,0,0,date("m", strtotime($firstday)),$today_day,date("Y", strtotime($firstday)))); echo $day; $today_day++; $day = date("d-m-Y", mktime(0,0,0,date("m", strtotime($firstday)),$today_day,date("Y", strtotime($firstday)))); echo $day; ?>
Output for 5.1.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
28-02-2014 01-03-201402-03-2014
Output for 5.1.0 - 5.1.2
28-02-2014 29-01-197030-01-1970
Output for 4.3.0 - 5.0.5
28-02-2014 29-08-203330-08-2033