3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $month = 1 //date("n"); $day = 13 //date("j"); $year = 2014 //date("Y"); if ($day > 15) { $day = 1; } else { if ($month == 0) { $month = 12; $year--; } else { $month--; $day = 16; } $daysinmonth = date("t", strtotime("$year - $month - $day")); } //$rangeEnd = date("Y-m-d 23:59:59", strtotime("last month")); //$rangeStart = date("Y-m-d 00:00:00", strtotime($rangeEnd." -6 days")); echo "$year $month $day $daysinmonth"; ?>
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '$day' (T_VARIABLE) in /in/bQoYK on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/bQoYK on line 3
Process exited with code 255.