3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(unserialize('O:8:"DateTime":0:{}') == new DateTime);
Output for 7.1.0 - 7.2.1
Fatal error: Uncaught Error: Invalid serialization data for DateTime object in /in/JjjWD:3 Stack trace: #0 [internal function]: DateTime->__wakeup() #1 /in/JjjWD(3): unserialize('O:8:"DateTime":...') #2 {main} thrown in /in/JjjWD on line 3
Process exited with code 255.
Output for 5.3.24 - 5.3.29, 5.4.14 - 5.6.30, 7.0.0 - 7.0.27
Fatal error: Invalid serialization data for DateTime object in /in/JjjWD on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Notice: Undefined property: DateTime::$timezone in /in/JjjWD on line -1 Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone ()' in /in/JjjWD:-1 Stack trace: #0 (): DateTime->__wakeup() #1 /in/JjjWD(-1): unserialize() #2 {main}
Process exited with code 255.
Output for hhvm-3.19.2 - 3.21.3
Notice: Undefined property: DateTime::$timezone in /in/JjjWD on line 3 Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone ()' in /in/JjjWD:3 Stack trace: #0 (): DateTime->__wakeup() #1 /in/JjjWD(3): unserialize() #2 {main}
Process exited with code 255.
Output for hhvm-3.10.1 - 3.18.5
Notice: Undefined property: DateTime::$timezone in /in/JjjWD on line 3 Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone ()' in /in/JjjWD:3 Stack trace: #0 /in/JjjWD(3): DateTime->__wakeup() #1 {main}
Process exited with code 255.
Output for 5.3.22 - 5.3.23, 5.4.12 - 5.4.13
Warning: main(): Trying to compare an incomplete DateTime object in /in/JjjWD on line 3 bool(false)
Output for 5.2.2 - 5.3.21, 5.4.0 - 5.4.11

Process exited with code 139.
Output for 5.2.0 - 5.2.1
bool(true)
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/JjjWD on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/JjjWD on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/JjjWD on line 3