run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = strtotime('20016-02-05'); $end = strtotime('2016-04-05'); $start_m = new DateTime($_GET["fecha1"]); $end_m = new DateTime($_GET["fecha2"]); $start_m->modify('first day of this month'); $end_m->modify('first day of next month'); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start_m, $interval, $end_m); print_r($date_range_m);
Output for 5.5.0 - 7.3.0rc3
Notice: Undefined index: fecha1 in /in/imXRG on line 5 Notice: Undefined index: fecha2 in /in/imXRG on line 6 Notice: Undefined variable: date_range_m in /in/imXRG on line 13