3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_startTime = strtotime('2018-10-31 00:00:00'); $_endTime = strtotime('2018-11-01 00:00:00'); var_dump(date('Y-n', $_startTime), date('Y-n', $_endTime), $needYear . '-' . $needMonth);
based on B8dgi
Output for 5.6.38 - 7.3.0rc3
Notice: Undefined variable: needYear in /in/jVgiT on line 6 Notice: Undefined variable: needMonth in /in/jVgiT on line 6 string(7) "2018-10" string(7) "2018-11" string(1) "-"