3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime(); print_r(serialize($now));
Output for 7.1.0
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:01:47.006292";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.28, 7.0.14
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:01:47.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.6
O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-03 02:41:17.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.5
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-02 15:57:13.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.4
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-10 01:29:56.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.3
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-18 01:40:17.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.2
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-21 12:14:59.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.1
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-23 12:27:56.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.0.0
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-26 14:55:09.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.21
O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-01 21:43:23.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.20
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-09 11:09:32.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.19
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-06 23:46:51.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.18
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-14 12:08:14.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.17
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-19 06:09:05.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.16
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-27 16:39:55.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.15
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-28 17:33:27.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.14
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-01 20:11:04.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.13
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-14 23:59:08.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.12
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-19 13:09:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.11
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-22 20:25:45.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.10
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-24 22:05:31.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.9
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-27 03:15:52.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.8
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-29 10:50:58.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.7
O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-24 21:53:27.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.35
O:8:"DateTime":3:{s:4:"date";s:26:"2016-05-22 01:06:37.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.34
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-10 17:05:54.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.33
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-08 12:20:38.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.32
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-16 18:02:32.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.31
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-20 09:01:32.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.30
O:8:"DateTime":3:{s:4:"date";s:26:"2016-03-31 19:34:46.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.29
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-16 14:07:07.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.28
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-20 16:26:24.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.27
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-21 18:56:24.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.26
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-26 00:24:38.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.25
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-28 06:32:30.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.5.24
O:8:"DateTime":3:{s:4:"date";s:26:"2016-04-30 14:01:55.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.45
O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-20 23:40:58.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.44
O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-04 10:57:12.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.43
O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-04 10:57:09.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.42
O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-04 10:57:08.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.41
O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-04 10:57:06.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.39 - 5.4.40
O:8:"DateTime":3:{s:4:"date";s:26:"2015-09-04 10:57:03.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.38
O:8:"DateTime":3:{s:4:"date";s:26:"2015-03-03 07:26:28.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.35 - 5.4.37
O:8:"DateTime":3:{s:4:"date";s:26:"2015-03-03 07:26:21.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.34
O:8:"DateTime":3:{s:4:"date";s:26:"2015-03-03 07:26:20.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.32
O:8:"DateTime":3:{s:4:"date";s:26:"2014-09-11 01:35:37.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.31
O:8:"DateTime":3:{s:4:"date";s:26:"2014-09-11 01:35:33.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.30
O:8:"DateTime":3:{s:4:"date";s:26:"2014-09-11 01:35:30.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.3.29, 5.4.28 - 5.4.29
O:8:"DateTime":3:{s:4:"date";s:19:"2014-09-11 01:35:30";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.27
O:8:"DateTime":3:{s:4:"date";s:19:"2014-09-11 01:35:35";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.26
O:8:"DateTime":3:{s:4:"date";s:19:"2014-09-11 01:35:34";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.23 - 5.4.25
O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-21 15:01:48";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.3 - 5.4.22
O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-21 15:01:49";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.3.13 - 5.3.28, 5.4.0 - 5.4.2
O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-21 15:01:50";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.3.0 - 5.3.12
O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-21 15:01:51";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.2.0 - 5.2.17
O:8:"DateTime":0:{}
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/DvU2A on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/DvU2A on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/DvU2A on line 3