3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new \DateTime('+1 month'); var_dump($x);
based on eqL0l
Output for 7.3.0rc3
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.037667" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0beta1
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.003423" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha1
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.002574" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.003322" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.005612" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.002067" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.035948" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.009286" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.020884" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.021511" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.015551" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.0.20, 7.1.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.018222" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.008512" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-08 22:51:51.004610" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }