3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(serialize(new DateTime('now', new DateTimeZone('UTC'))));
based on lgP1T
Output for 7.3.0alpha1
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.003668";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.2.6
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.004128";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.2.5
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.004495";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.2.0
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.004963";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.1.7
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.002525";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.1.6
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.012832";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.1.5
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.010445";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.1.0
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.004102";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.28, 7.0.20
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.6
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-21 12:52:06.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.5
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-03 08:39:56.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.4
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-10 21:51:13.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.3
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-18 23:31:21.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.2
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-23 05:36:31.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.1
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-24 08:37:10.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.0.0
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-27 09:26:25.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.21
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-02 15:36:56.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.20
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-10 07:42:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.19
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-08 06:00:35.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.18
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-15 15:03:18.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.17
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-20 02:42:16.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.16
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-28 10:16:22.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.15
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-29 11:05:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.14
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-14 16:48:39.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.13
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-15 17:32:06.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.12
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-20 08:22:34.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.11
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-24 14:26:46.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.10
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-25 16:31:52.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.9
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-27 22:03:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.6.8
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-30 06:25:08.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.35
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-23 02:21:50.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.34
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-11 09:57:23.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.33
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-09 09:09:27.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.32
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-17 19:05:18.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.31
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-21 05:55:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.30
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-01 12:56:10.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.29
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-17 07:44:45.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.28
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-21 11:22:05.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.27
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-22 12:55:43.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.26
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-26 19:14:52.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.25
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-29 02:43:10.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.5.24
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-24 09:14:15.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.44 - 5.4.45
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:52.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.41 - 5.4.43
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:53.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.38 - 5.4.40
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.35 - 5.4.37
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:55.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.30 - 5.4.34
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-02 00:46:56.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.24 - 5.4.29
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2016-02-02 00:46:57";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.28, 5.4.19 - 5.4.23
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2016-02-02 00:46:58";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.24 - 5.3.27, 5.4.14 - 5.4.18
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2016-02-02 00:46:59";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.22 - 5.3.23, 5.4.12 - 5.4.13
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2016-02-02 00:47:00";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.29
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2016-02-02 00:46:56";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"