3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = new DateTime; var_dump(serialize($x));
Output for 7.1.0
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-28 02:35:39.004455";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.28, 7.0.14
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-28 02:35:39.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.6
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-03 02:07:42.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.5
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-02 15:23:19.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.4
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-10 00:50:51.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.3
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-18 01:03:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.2
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-21 11:38:22.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.1
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-23 11:50:02.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 7.0.0
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-26 14:21:45.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.21
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-01 21:10:10.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.20
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-09 10:38:09.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.19
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-06 23:06:18.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.18
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-14 10:36:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.17
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-19 05:32:07.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.16
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-27 16:06:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.15
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-28 16:59:34.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.14
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-01 19:39:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.13
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-14 23:27:01.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.12
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-19 12:35:02.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.11
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-22 19:51:13.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.10
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-24 21:31:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.9
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-27 02:39:59.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.8
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-29 10:15:09.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.6.7
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-24 20:55:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.35
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-22 00:27:37.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.34
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-10 16:33:41.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.33
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-08 11:45:07.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.32
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-16 17:25:36.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.31
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-20 08:25:12.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.30
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-31 19:01:44.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.29
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-16 13:33:36.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.28
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-20 15:49:14.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.27
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-21 18:23:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.26
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-25 23:48:26.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.25
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-28 05:56:21.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.5.24
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-30 13:28:20.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.45
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-14 01:33:43.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.44
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-14 01:33:40.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.43
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-14 01:33:37.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.42
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-14 01:33:36.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.41
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-14 01:33:33.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.40
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-05-08 14:57:17.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.39
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-05-08 14:57:16.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.38
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-03-02 10:58:52.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.37
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-02-08 06:13:19.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.36
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2015-02-08 06:13:18.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.34 - 5.4.35
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2014-12-04 22:51:05.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.32
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2014-09-06 22:23:11.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.31
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2014-09-06 22:23:08.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.30
string(128) "O:8:"DateTime":3:{s:4:"date";s:26:"2014-09-06 22:23:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.28 - 5.4.29
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-09-06 22:23:04";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.26 - 5.4.27
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-09-06 22:23:09";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.4.16 - 5.4.25
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-28 02:35:40";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.3.25 - 5.3.28, 5.4.0 - 5.4.15
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-28 02:35:41";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.3.29
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-09-06 22:23:05";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.3.5 - 5.3.24
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-28 02:35:42";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.3.0 - 5.3.4
string(121) "O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-28 02:35:43";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}"
Output for 5.2.0 - 5.2.17
string(19) "O:8:"DateTime":0:{}"
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/ftXFh on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/ftXFh on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/ftXFh on line 2