3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
55.25 ms | 402 KiB | 5 Q