3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('now', new \DateTimeZone('UTC')); $dt->modify("+3 days"); $dt = clone $dt; $dt->modify("-6 weeks"); $serial = serialize(array($dt)); var_dump( $serial );
based on JLHS2
Output for 7.2.0
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.005405";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.1.10
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.002917";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.1.7
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.002906";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.1.6
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.012869";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.1.5
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.020500";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.1.0
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.003993";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.28, 7.0.20
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:06.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.6
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-25 16:35:57.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.5
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-24 05:00:43.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.4
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-01-31 17:47:58.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.3
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-08 18:57:09.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.2
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-13 01:05:18.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.1
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-14 04:43:12.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 7.0.0
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-17 05:39:12.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.21
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-24 11:45:02.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.20
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-02 03:59:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.19
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-01-29 01:59:27.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.18
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-05 10:43:28.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.17
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-09 22:22:27.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.16
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-18 06:26:25.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.15
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-19 07:17:07.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.14
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-23 09:08:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.13
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-07 13:32:48.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.12
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-12 04:02:05.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.11
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-16 10:25:18.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.10
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-17 12:27:39.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.9
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-19 17:37:30.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.6.8
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-22 02:29:37.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.35
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-13 19:12:01.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.34
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-03 06:11:55.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.33
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-01-30 04:43:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.32
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-07 14:39:02.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.31
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-11 01:24:44.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.30
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-02-22 09:11:01.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.29
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-09 03:56:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.28
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-13 07:16:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.27
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-14 09:02:12.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.26
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-18 15:10:23.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.25
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-20 22:05:51.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.5.24
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-15 04:34:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.45
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:08.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.44
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:09.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.42 - 5.4.43
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:10.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.40 - 5.4.41
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:11.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.38 - 5.4.39
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:12.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.35 - 5.4.37
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:13.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.32 - 5.4.34
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:14.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.30 - 5.4.31
string(124) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-10-02 09:08:15.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.3.29, 5.4.29
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:15";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.25 - 5.4.28
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:16";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.3.28, 5.4.21 - 5.4.24
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:17";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.4.18 - 5.4.20
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:18";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.3.25 - 5.3.27, 5.4.14 - 5.4.17
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:19";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.3.20 - 5.3.24, 5.4.11 - 5.4.13
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:20";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"
Output for 5.3.19, 5.4.9 - 5.4.10
string(117) "a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:19:"2015-10-02 09:08:21";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}"