3v4l.org

run code in 200+ PHP versions simultaneously
<?php var_dump((new \DateTimeImmutable())->modify('+2 years'));
Output for 7.4.0
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000221" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0rc6
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000482" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0rc5
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000241" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0rc4
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0rc3
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000233" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0rc2
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000224" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0rc1
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000215" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0beta4
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000245" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.4, 7.4.0beta2
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000212" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0beta1
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000268" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.4.0alpha3
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000267" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.9, 7.4.0alpha2
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.5, 7.4.0alpha1
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000211" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.28, 7.3.12
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000206" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.11
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000258" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.10
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000262" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.8
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000187" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.7
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000676" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.6
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000223" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.3
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000356" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.2
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000132" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.1
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000203" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000198" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.25
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000199" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.24
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000217" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.23
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000220" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.22
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000210" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.21
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000344" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.20
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000235" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.19
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000196" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.18
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000244" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.17
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000297" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.33
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000189" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.32
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000158" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.31
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000136" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.30
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000149" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.29
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000142" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.27
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000184" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.26
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2021-12-03 08:39:11.000151" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }