3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new DateTime(''));
Output for 7.3.0rc5
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-11-19 02:41:20.000208" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0rc4
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003999" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0rc3
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003221" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0rc2
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.012057" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0rc1
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.007746" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0beta3
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.012964" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0beta2
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.005549" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0beta1
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.005298" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha4
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004388" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha3
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.002454" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha2
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.006256" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha1
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.002395" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.030971" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.015187" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.007388" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004290" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003470" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004523" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003686" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.024878" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004469" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004507" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.005187" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003252" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.008443" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.015054" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.013860" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004108" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003373" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003138" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.005436" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003307" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.004149" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.002985" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.002868" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003957" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.002898" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003478" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.002886" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003949" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.021223" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.024375" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.020445" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.30 - 5.4.45, 5.5.14 - 5.6.38, hhvm-3.13.2, hhvm-3.17.3, hhvm-3.18.5, hhvm-3.21.0 - 3.22.0, 7.0.0 - 7.0.31, 7.1.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.019568" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003458" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:10.003864" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for hhvm-3.10.1 - 3.12.14, hhvm-3.15.4, hhvm-3.18.4, hhvm-3.19.2 - 3.20.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-25 10:24:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.0 - 5.4.29, 5.5.0 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2018-10-25 10:24:10" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.2.0 - 5.2.17
object(DateTime)#1 (0) { }
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/cniT7 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/cniT7 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/cniT7 on line 3