3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('now', new \DateTimeZone('UTC')); $serial = serialize(clone $dt); var_dump( $serial );
based on O2Oo1
Output for 7.2.0
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-11-10 09:06:33.005022";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 7.1.10
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-11-10 09:06:33.005394";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:"2015-11-10 09:06:33.003845";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:"2015-11-10 09:06:33.012449";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:"2015-11-10 09:06:33.011096";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:"2015-11-10 09:06:33.003962";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:"2015-11-10 09:06:33.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-03 16:35:54.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 05:00:41.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 17:47:55.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 18:57:07.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 01:05:15.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 04:43: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 05:39:09.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 11:45:00.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 03:59:52.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 01:59:25.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 10:43:25.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-19 22:22:25.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 06:26:23.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 07:17:05.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-02 09:08:02.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 13:32:46.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 04:02:03.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 10:25:15.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 12:27:37.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 17:37:28.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 02:29:35.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-22 19:11:53.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 06:11:52.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 04:43:47.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 14:38:59.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 01:24:41.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 09:10:58.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 03:56:02.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 07:16:02.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 09:02:10.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 15:10:20.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-28 22:05:49.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 04:34:48.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.45
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-11-10 09:06:35.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.43 - 5.4.44
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-11-10 09:06:36.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.41 - 5.4.42
string(114) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-11-10 09:06:37.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:"2015-11-10 09:06:38.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:"2015-11-10 09:06:39.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:"2015-11-10 09:06:40.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.29, 5.4.29
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2015-11-10 09:06:40";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.4.23 - 5.4.28
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2015-11-10 09:06:41";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.28, 5.4.18 - 5.4.22
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2015-11-10 09:06:42";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.23 - 5.3.27, 5.4.12 - 5.4.17
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2015-11-10 09:06:43";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
Output for 5.3.19 - 5.3.22, 5.4.9 - 5.4.11
string(107) "O:8:"DateTime":3:{s:4:"date";s:19:"2015-11-10 09:06:44";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"