3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 2014; $month = 5; $start_day = date('Y-m-01',strtotime("$year-$month-01")); $end_day = date('Y-m-d',strtotime("$start_day +1 month")-1);

preferences:
35.2 ms | 402 KiB | 5 Q