3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Europe/Minsk'); $a = new DateTimeImmutable("2015-01-01 11:00:00"); $b = $a->setTime(10, 0)->setTimezone(new DateTimeZone("03:00")); var_dump($a > $b); $a->getTimestamp(); $b->getTimestamp(); var_dump($a > $b);
based on 6QUKu
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (03:00) in /in/G4lQF:7 Stack trace: #0 /in/G4lQF(7): DateTimeZone->__construct('03:00') #1 {main} thrown in /in/G4lQF on line 7
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (03:00)' in /in/G4lQF:7 Stack trace: #0 /in/G4lQF(7): DateTimeZone->__construct('03:00') #1 {main} thrown in /in/G4lQF on line 7
Process exited with code 255.
Output for 5.3.21 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/G4lQF on line 5
Process exited with code 255.