3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = new DateTime(); var_dump($test);
based on vdLWg
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.002887" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.003149" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.004111" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.005972" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.004728" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.015302" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.018975" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.017894" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.14 - 5.6.30, hhvm-3.10.1 - 3.12.14, hhvm-3.15.4, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.0.23, 7.1.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.015300" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.004356" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:43.004430" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for hhvm-3.13.2, hhvm-3.17.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-09-07 16:05:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.0 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-09-07 16:05:43" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }