3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = new DateTime; $a = (array) $test; var_dump($test::__set_state($a));
based on WU2fK
Output for 7.2.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.004222" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.003005" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.005285" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.012201" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.010749" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.004069" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.28, 7.0.20
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.6
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-21 13:23:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.5
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-03 09:25:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.4
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-10 21:31:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.3
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-18 22:55:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.2
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-23 05:08:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.1
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-24 08:16:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 10:09:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.21
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-02 16:18:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.20
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-10 08:26:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.19
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-08 05:39:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.18
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-15 14:36:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.17
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-20 02:09:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.16
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-28 10:58:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.15
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 11:47:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.14
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-14 17:30:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.13
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-15 18:09:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.12
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-20 08:38:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.11
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-24 15:04:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.10
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-25 17:10:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.9
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 22:36:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.8
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 07:06:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.35
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-23 02:17:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.34
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-11 10:40:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.33
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-09 08:38:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.32
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-17 18:33:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.31
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-21 05:18:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.30
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-01 13:39:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.29
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-17 08:27:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.28
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-21 11:57:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.27
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-22 13:35:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.26
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-26 19:51:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.25
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-29 03:16:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.24
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-24 09:40:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.44 - 5.4.45
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.41 - 5.4.43
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.40
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.38 - 5.4.39
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.35 - 5.4.37
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.32 - 5.4.34
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.30 - 5.4.31
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-05 22:58:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.29, 5.4.29
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:24" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.25 - 5.4.28
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:25" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.28, 5.4.22 - 5.4.24
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:26" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.18 - 5.4.21
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:27" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.25 - 5.3.27, 5.4.15 - 5.4.17
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:28" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.21 - 5.3.24, 5.4.12 - 5.4.14
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:29" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.11
object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-05 22:58:30" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }