3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime(); print_r(serialize(clone $now));
Output for 7.2.10
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004593";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.9
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003454";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.8
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004668";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.7
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.007739";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.6
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.008886";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.5
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.006901";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.4
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.014412";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.3
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004478";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.2
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004498";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.1
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003398";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.2.0
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.005288";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.22
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.008523";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.21
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.011749";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.20
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.010756";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.19
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004143";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.18
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004577";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.17
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003153";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.16
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004050";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.15
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004089";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.14
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.005557";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.13
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004299";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.12
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003840";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.11
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003065";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.10
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003222";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.9
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.002793";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.8
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.002871";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.7
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.004096";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.6
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.022938";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.5
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.021890";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.4
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.022636";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.4.30 - 5.4.45, 5.5.14 - 5.6.19, 5.6.21 - 5.6.38, hhvm-3.12.14 - 3.13.2, hhvm-3.17.3 - 3.18.5, hhvm-3.20.2 - 3.21.0, hhvm-3.22.0, 7.0.0 - 7.0.31, 7.1.3
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.2
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.021043";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.1
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.003027";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 7.1.0
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:49.011501";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.6.20, hhvm-3.10.1 - 3.11.1, hhvm-3.15.4, hhvm-3.19.2, hhvm-3.21.3
O:8:"DateTime":3:{s:4:"date";s:26:"2014-02-21 15:02:50.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}
Output for 5.3.0 - 5.4.29, 5.5.0 - 5.5.13
O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-21 15:02:49";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/n6ISO on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_VARIABLE in /in/n6ISO on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_VARIABLE in /in/n6ISO on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/n6ISO on line 4
Process exited with code 255.