3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('9999-99-99', new \DateTimeZone('UTC')); $serial = serialize($dt); var_dump( $serial );
based on OukNd
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (9999-99-99) at position 6 (9): Unexpected character in /in/O2Oo1:3 Stack trace: #0 /in/O2Oo1(3): DateTime->__construct('9999-99-99', Object(DateTimeZone)) #1 {main} thrown in /in/O2Oo1 on line 3
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (9999-99-99) at position 6 (9): Unexpected character' in /in/O2Oo1:3 Stack trace: #0 /in/O2Oo1(3): DateTime->__construct('9999-99-99', Object(DateTimeZone)) #1 {main} thrown in /in/O2Oo1 on line 3
Process exited with code 255.