3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month=12; $year=2014; $startdate = strtotime($year.'-'.$month.'-1'); $stopdate = strtotime('last day of this month ',$startdate); echo (date('Y-m-d',$startDate).' - '.date('Y-m-d',$stopDate));

preferences:
44.34 ms | 402 KiB | 5 Q