3v4l.org

run code in 300+ PHP versions simultaneously
<?php // In the beginning there are no Sundays counted yet $number_of_sundays = 0; // Make the following actions for all years of the twentieth century for ($current_year = 1900; $current_year <= 1999; $current_year++) { //Make the following actions for all months from January to December for ($current_month = 1; $current_month <= 12; $current_month++) { // Get Unix Timestamp of the current month and year on the first day of the month $current_date = mktime(0, 0, 0, $current_month, 01, $current_year); $get_day_of_week = date("D", $current_date); if ($get_day_of_week == "Sun") { echo 01.$current_month.$current_year."was a Sunday!"."\n"; } } }
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '$current_month' (T_VARIABLE), expecting ',' or ';' in /in/o1Wpm on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /in/o1Wpm on line 15
Process exited with code 255.

preferences:
181.99 ms | 1395 KiB | 63 Q