3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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);
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: startDate in /in/tAgoJ on line 8 Notice: Undefined variable: stopDate in /in/tAgoJ on line 8 1970-01-01 - 1970-01-01
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: startDate in /in/tAgoJ on line 8 Notice: Undefined variable: stopDate in /in/tAgoJ on line 8 1970-01-01 - 1970-01-01