3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bday = strtotime(str_replace(".", "", '1900.10.28 00:00')); $bday = date('Y-m-d', $bday) . " 00:00"; $bday2 = date('Y-m-d', $bday + 86400) . " 00:00"; if ($bday == "1970-01-01 00:00") { try { $bday = new DateTime('1900.10.28 00:00'); echo $bday = $bday->format("Y-m-d"); } catch (Exception $e) { echo $e->getMessage(); } continue; } ?>
Output for 5.0.0 - 5.0.5, 5.2.6 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Output for 5.2.0 - 5.2.5
DateTime::__construct(): Failed to parse time string (1900.10.28 00:00) at position 5 (1): Double time specification Fatal error: Cannot break/continue 1 level in /in/3ueim on line 14
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/3ueim on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/3ueim on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected '{' in /in/3ueim on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/3ueim on line 7
Process exited with code 255.

preferences:
250.18 ms | 1395 KiB | 199 Q