3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); //$date = new DateTime('now +1 day'); //echo $date->format('Y-m-d H:i:s'); //echo $date->format('H:i \o\n\ \t\h\e jS F Y'); $date = new DateTime('now +1 day'); echo $date->format('Y-m-d H:i:s'); $source = '31/07/2010'; $date = new DateTime($source); echo $date->format('Y-m-d');
Output for 8.3.0 - 8.3.6
2014-03-25 16:50:08 Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
2014-03-25 16:50:08 Fatal error: Uncaught Exception: Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
2014-03-25 16:50:08 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.6
2016-05-04 15:45:09 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.5
2016-04-04 04:13:02 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.4
2016-03-11 16:55:16 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.3
2016-03-19 17:44:27 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.2
2016-03-24 00:08:10 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.1
2016-03-25 03:53:39 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 7.0.0
2016-03-28 04:50:22 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.2.14, 5.3.2 - 5.3.3, 5.3.5, 5.3.8, 5.3.10, 5.3.12 - 5.3.14, 5.3.16, 5.3.18, 5.3.21 - 5.3.24, 5.3.27, 5.4.1, 5.4.3 - 5.4.4, 5.4.6, 5.4.10, 5.4.15 - 5.4.26, 5.6.28
2014-03-25 16:50:08 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.21
2016-05-03 10:55:22 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.20
2016-04-11 03:12:05 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.19
2016-03-09 01:07:07 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.18
2016-03-16 09:42:34 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.17
2016-03-20 21:29:41 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.16
2016-03-29 05:37:40 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.15
2016-03-30 06:28:38 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.14
2016-04-03 08:22:32 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.13
2016-04-16 12:42:26 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.12
2016-04-21 03:10:36 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.11
2016-04-25 09:26:06 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.10
2016-04-26 11:36:05 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.9
2016-04-28 16:45:25 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.6.8
2016-05-01 01:37:41 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.35
2016-05-23 17:05:19 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.34
2016-04-12 05:24:40 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.33
2016-03-10 03:43:13 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.32
2016-03-18 13:25:51 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.31
2016-03-22 00:27:41 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.30
2016-04-02 08:22:06 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.29
2016-04-18 03:06:44 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.28
2016-04-22 06:23:14 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.27
2016-04-23 08:12:56 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.26
2016-04-27 14:18:29 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.25
2016-04-29 21:09:40 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.5.24
2016-05-25 03:46:08 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.45
2015-09-21 20:49:52 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.44
2015-09-21 20:49:48 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.43
2015-08-01 05:21:42 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.42
2015-08-01 05:21:40 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.41
2015-08-01 05:21:38 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.39 - 5.4.40
2015-08-01 05:21:34 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.38
2015-03-16 03:34:16 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.37
2015-03-16 03:34:08 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.34 - 5.4.36
2015-03-16 03:34:07 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.32
2014-09-09 00:31:56 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.31
2014-09-09 00:31:53 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.3.29, 5.4.30
2014-09-09 00:31:49 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.29
2014-09-09 00:31:48 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.28
2014-09-09 00:31:47 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.4.27
2014-09-09 00:31:54 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.2.0 - 5.2.13, 5.2.15 - 5.2.17, 5.3.0 - 5.3.1, 5.3.4, 5.3.6 - 5.3.7, 5.3.9, 5.3.11, 5.3.15, 5.3.17, 5.3.19 - 5.3.20, 5.3.25 - 5.3.26, 5.3.28, 5.4.0, 5.4.2, 5.4.5, 5.4.7 - 5.4.9, 5.4.11 - 5.4.14
2014-03-25 16:50:07 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (31/07/2010) at position 0 (3): Unexpected character' in /in/2E6eQ:12 Stack trace: #0 /in/2E6eQ(12): DateTime->__construct('31/07/2010') #1 {main} thrown in /in/2E6eQ on line 12
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/2E6eQ on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/2E6eQ on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/2E6eQ on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/2E6eQ on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/2E6eQ on line 2

preferences:
230.81 ms | 401 KiB | 314 Q