3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $daysInMonth = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); foreach ($year = 1500; $year < 2000; $year++) { foreach ($month = 1; $month <= 12; $month++) { foreach ($day = 1; $day < $daysInMonth[$month]; $day++) { $baseString = sprintf("%4d-%02d-%02d 00:00:00", $year, $month, $day); $timestamp = strtotime($baseString); $roundTrip = date("Y-m-d H:i:s", $timestamp); echo "$baseString ($timestamp) $roundTrip\n"; break; } break; } break; }
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected ';' in /in/4SDQt on line 4
Process exited with code 255.