3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $today_day = 28; $firstday=$day; $day = date("d-m-Y", mktime(0,0,0,2, $today_day,date("Y"))); 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; ?>
Output for 5.1.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: day in /in/sJmkb on line 3 28-02-2014 29-01-1970
Output for 5.1.0 - 5.1.1
Notice: Undefined variable: day in /in/sJmkb on line 3 28-02-2014 29-03-2014
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: day in /in/sJmkb on line 3 28-02-2014 Warning: strtotime(): Called with an empty time parameter. in /in/sJmkb on line 7 Warning: strtotime(): Called with an empty time parameter. in /in/sJmkb on line 7 29-01-1970
Output for 5.0.1 - 5.0.3
Notice: Undefined variable: day in /in/sJmkb on line 3 28-02-2014 Warning: strtotime(): Called with an empty time parameter. in /in/sJmkb on line 7 Warning: strtotime(): Called with an empty time parameter. in /in/sJmkb on line 7 29-01-1970
Output for 4.3.2 - 5.0.0
Notice: Undefined variable: day in /in/sJmkb on line 3 28-02-2014 Notice: strtotime(): Called with empty time parameter in /in/sJmkb on line 7 Notice: strtotime(): Called with empty time parameter in /in/sJmkb on line 7 29-03-2014
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: day in /in/sJmkb on line 3 28-02-2014 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/sJmkb on line 7 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/sJmkb on line 7 29-03-2014