3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = new DateTimeImmutable(); $d->setTime(0, 0); var_dump($d);
Output for 7.3.0rc3
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.033725" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0beta1
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.002355" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha1
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.003464" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.6
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.003333" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.0
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.003930" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.20
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.003990" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.005293" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.015096" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.024736" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.030515" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.4
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.021469" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20, 7.1.3
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.2
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.022300" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.1
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.014182" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.013118" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for hhvm-3.15.4
object(DateTimeImmutable)#1 (1) { ["data":"DateTimeImmutable":private]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-11 10:38:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }