3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = new DateTime(null, new DateTimeZone('Australia/Sydney')); var_dump(new DateTime($value->format('Y-m-d H:i:s T')));
Output for 7.0.20 - 7.2.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-10-22 03:47:44.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 7.0.6
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-03 08:27:25.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 7.0.5
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-02 23:00:51.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 7.0.4
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-10 08:57:49.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 7.0.3
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-18 09:22:53.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 7.0.2
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-21 20:05:42.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 7.0.1
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-23 19:44:49.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 7.0.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-26 22:50:08.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.21
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-02 03:33:05.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.20
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-09 17:16:36.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.19
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-07 06:22:01.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.18
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-14 18:38:18.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.17
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-19 13:58:20.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.16
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 23:34:15.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.15
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 00:31:41.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.14
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-02 03:15:12.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.6.13
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-15 06:12:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.12
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-19 19:15:54.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.11
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-23 02:34:12.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.10
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-25 04:12:31.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.9
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 09:17:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.8
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-29 16:51:17.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.6.7
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-25 02:41:31.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.35
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-22 06:46:15.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.34
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-10 22:53:02.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.33
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-08 20:09:38.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.5.32
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-16 05:11:08.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.5.31
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-20 16:52:47.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.5.30
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-01 02:37:34.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEDT" }
Output for 5.5.29
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-16 20:14:44.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.28
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-20 22:25:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.27
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-22 01:05:13.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.26
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-26 06:26:53.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.25
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-28 12:33:52.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.5.24
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 20:12:57.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "AEST" }
Output for 5.4.44 - 5.4.45
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-11-18 01:56:05 AEDT) at position 20 (A): The timezone could not be found in the database' in /in/2i816:4 Stack trace: #0 /in/2i816(4): DateTime->__construct('2015-11-18 01:5...') #1 {main} thrown in /in/2i816 on line 4
Process exited with code 255.
Output for 5.4.43
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-11-18 01:56:06 AEDT) at position 20 (A): The timezone could not be found in the database' in /in/2i816:4 Stack trace: #0 /in/2i816(4): DateTime->__construct('2015-11-18 01:5...') #1 {main} thrown in /in/2i816 on line 4
Process exited with code 255.
Output for 5.4.41 - 5.4.42
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-11-18 01:56:07 AEDT) at position 20 (A): The timezone could not be found in the database' in /in/2i816:4 Stack trace: #0 /in/2i816(4): DateTime->__construct('2015-11-18 01:5...') #1 {main} thrown in /in/2i816 on line 4
Process exited with code 255.
Output for 5.4.38 - 5.4.40
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-11-18 01:56:08 AEDT) at position 20 (A): The timezone could not be found in the database' in /in/2i816:4 Stack trace: #0 /in/2i816(4): DateTime->__construct('2015-11-18 01:5...') #1 {main} thrown in /in/2i816 on line 4
Process exited with code 255.
Output for 5.4.36 - 5.4.37
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-11-18 01:56:09 AEDT) at position 20 (A): The timezone could not be found in the database' in /in/2i816:4 Stack trace: #0 /in/2i816(4): DateTime->__construct('2015-11-18 01:5...') #1 {main} thrown in /in/2i816 on line 4
Process exited with code 255.
Output for 5.4.34 - 5.4.35
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-11-18 01:56:10 AEDT) at position 20 (A): The timezone could not be found in the database' in /in/2i816:4 Stack trace: #0 /in/2i816(4): DateTime->__construct('2015-11-18 01:5...') #1 {main} thrown in /in/2i816 on line 4
Process exited with code 255.
Output for 5.4.30 - 5.4.32
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-18 01:56:11.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.26 - 5.4.29
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:12" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.28, 5.4.23 - 5.4.25
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:13" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.20 - 5.4.22
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:14" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.27, 5.4.17 - 5.4.19
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:15" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.23 - 5.3.26, 5.4.13 - 5.4.16
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:16" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.19 - 5.3.22, 5.4.9 - 5.4.12
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:17" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.29
object(DateTime)#2 (3) { ["date"]=> string(19) "2015-11-18 01:56:11" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }