3v4l.org

run code in 200+ PHP versions simultaneously
<?php var_dump(new DateTime('-24 hours'));
Output for 7.4.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000198" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.18, 7.4.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000182" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000192" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000212" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.8, 7.3.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000204" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000180" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000175" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000256" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.14, 7.2.4, 7.3.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000137" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000148" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000213" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000124" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.10, 7.3.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000104" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.31, 7.3.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000114" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000235" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000150" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.9, 7.2.20, 7.2.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000140" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000141" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000133" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000145" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000123" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000220" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000164" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000157" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000130" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.12 - 7.2.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000101" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000113" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000112" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.16, 7.1.26, 7.2.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000105" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.2, 7.2.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000106" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0, 7.2.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000135" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.11, 7.2.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000126" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000122" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000115" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000108" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.4, 7.1.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000168" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000172" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000132" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000186" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000149" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000095" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000103" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10, 7.1.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000127" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.15, 7.1.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000117" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6, 7.1.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000169" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000097" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000107" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000099" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000102" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000092" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000119" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.9, 7.1.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000125" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.1, 7.1.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000144" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000156" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:07.000141" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.30 - 5.4.45, 5.5.14 - 5.6.3, 5.6.5 - 7.0.33, 7.1.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-20 15:50:07.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) "2014-01-20 15:50:06" ["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/FLIoS on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/FLIoS on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/FLIoS on line 2