3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $bday = strtotime(str_replace(".", "", '1900.10.28')); $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'); 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.6.28, hhvm-3.10.0 - 3.12.0
Output for 5.2.0 - 5.2.5
DateTime::__construct(): Failed to parse time string (1900.10.28) at position 5 (1): Double time specification Fatal error: Cannot break/continue 1 level in /in/ZcfMk on line 14
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/ZcfMk on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/ZcfMk on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/ZcfMk on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ZcfMk on line 7
Process exited with code 255.