3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo ("Expires: ".gmdate("D, d M Y H:i:s", time() + 3600)." GMT"); echo '\n\n'; $expirytime=new DateTime("D, d M Y H:i:s O"); echo $expirytime;
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.6
Expires: Thu, 22 Oct 2015 11:55:23 GMT\n\n Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (D, d M Y H:i:s O) at position 5 (M): Double timezone specification in /in/AbInk:7 Stack trace: #0 /in/AbInk(7): DateTime->__construct('D, d M Y H:i:s ...') #1 {main} thrown in /in/AbInk on line 7
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Expires: Thu, 22 Oct 2015 11:55:23 GMT\n\n Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (D, d M Y H:i:s O) at position 5 (M): Double timezone specification' in /in/AbInk:7 Stack trace: #0 /in/AbInk(7): DateTime->__construct('D, d M Y H:i:s ...') #1 {main} thrown in /in/AbInk on line 7
Process exited with code 255.

preferences:
124.87 ms | 402 KiB | 135 Q