3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime("30 minutes ago"); echo $date->format('Y-m-d H:i:s').'<br>'; $date = new DateTime("30 minutes ahead"); echo $date->format('Y-m-d H:i:s').'<br>'; $date = new DateTime(); echo $date->format('Y-m-d H:i:s').'<br>';
Output for 8.3.0 - 8.3.6
2016-01-11 17:14:09<br> Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
2016-01-11 17:14:09<br> Fatal error: Uncaught Exception: Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30
2016-01-11 17:14:09<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 8.0.13
2016-01-11 16:14:09<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.6
2016-05-21 13:08:30<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.5
2016-04-03 09:07:48<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.4
2016-03-10 21:14:24<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.3
2016-03-18 22:40:46<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.2
2016-03-23 04:54:05<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.1
2016-03-24 07:59:17<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 7.0.0
2016-03-27 09:52:31<br> Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.28
2016-01-11 17:14:09<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.21
2016-05-02 16:01:31<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.20
2016-04-10 08:09:53<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.19
2016-03-08 05:23:29<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.18
2016-03-15 14:21:21<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.17
2016-03-20 01:53:58<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.16
2016-03-28 10:42:07<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.15
2016-03-29 11:31:09<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.14
2016-04-14 17:14:06<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.13
2016-04-15 17:53:07<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.12
2016-04-20 08:22:27<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.11
2016-04-24 14:48:32<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.10
2016-04-25 16:54:28<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.9
2016-04-27 22:20:31<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.6.8
2016-04-30 06:49:47<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.35
2016-05-23 02:03:22<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.34
2016-04-11 10:23:47<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.33
2016-03-09 08:22:38<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.32
2016-03-17 18:18:45<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.31
2016-03-21 05:04:26<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.30
2016-04-01 13:23:09<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.29
2016-04-17 08:10:50<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.28
2016-04-21 11:41:58<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.27
2016-04-22 13:18:59<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.26
2016-04-26 19:35:46<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.25
2016-04-29 03:01:36<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.
Output for 5.5.24
2016-05-24 09:24:16<br> Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (30 minutes ahead) at position 11 (a): The timezone could not be found in the database' in /in/Calbc:6 Stack trace: #0 /in/Calbc(6): DateTime->__construct('30 minutes ahea...') #1 {main} thrown in /in/Calbc on line 6
Process exited with code 255.

preferences:
205.19 ms | 401 KiB | 226 Q