3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date=date('Y-m',strtotime(date())); var_dump(date('Y-m'),strtotime("$date -1 month")); ?>
Output for 5.2.7 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: date() expects at least 1 parameter, 0 given in /in/L3124 on line 2 string(7) "2013-10" int(-2682000)
Output for 5.2.0 - 5.2.6
Warning: date() expects at least 1 parameter, 0 given in /in/L3124 on line 2 string(7) "2013-10" int(-435600)
Output for 5.1.2 - 5.1.6
Warning: date() expects at least 1 parameter, 0 given in /in/L3124 on line 2 string(7) "2013-10" int(23305127)
Output for 5.1.0 - 5.1.1
Warning: date() expects at least 1 parameter, 0 given in /in/L3124 on line 2 string(7) "2013-10" int(1380348780)
Output for 5.0.1 - 5.0.5
Warning: Wrong parameter count for date() in /in/L3124 on line 2 Warning: strtotime(): Called with an empty time parameter. in /in/L3124 on line 2 string(7) "2013-10" int(2674800)
Output for 4.3.2 - 5.0.0
Warning: Wrong parameter count for date() in /in/L3124 on line 2 Notice: strtotime(): Called with empty time parameter in /in/L3124 on line 2 string(7) "2013-10" int(1383260400)
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for date() in /in/L3124 on line 2 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/L3124 on line 2 string(7) "2013-10" int(1383260400)