3v4l.org

run code in 200+ PHP versions simultaneously
<?php $d1=new DateTime('NOW'); print_r( $d1 ) ;
Output for 7.4.0
DateTime Object ( [date] => 2013-05-31 07:31:24.000202 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.12
DateTime Object ( [date] => 2013-05-31 07:31:24.000210 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.11
DateTime Object ( [date] => 2013-05-31 07:31:24.000218 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.10
DateTime Object ( [date] => 2013-05-31 07:31:24.000152 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.9
DateTime Object ( [date] => 2013-05-31 07:31:24.000241 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.25, 7.3.8
DateTime Object ( [date] => 2013-05-31 07:31:24.000150 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.7
DateTime Object ( [date] => 2013-05-31 07:31:24.000253 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.6
DateTime Object ( [date] => 2013-05-31 07:31:24.000226 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.5
DateTime Object ( [date] => 2013-05-31 07:31:24.000153 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.4
DateTime Object ( [date] => 2013-05-31 07:31:24.000139 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.3
DateTime Object ( [date] => 2013-05-31 07:31:24.000136 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.2
DateTime Object ( [date] => 2013-05-31 07:31:24.000114 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.1
DateTime Object ( [date] => 2013-05-31 07:31:24.000148 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.0
DateTime Object ( [date] => 2013-05-31 07:31:24.000146 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.24
DateTime Object ( [date] => 2013-05-31 07:31:24.000159 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.23
DateTime Object ( [date] => 2013-05-31 07:31:24.000130 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.22
DateTime Object ( [date] => 2013-05-31 07:31:24.000143 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.21
DateTime Object ( [date] => 2013-05-31 07:31:24.000137 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.20
DateTime Object ( [date] => 2013-05-31 07:31:24.000160 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.19
DateTime Object ( [date] => 2013-05-31 07:31:24.000131 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.11, 7.2.18
DateTime Object ( [date] => 2013-05-31 07:31:24.000144 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.17
DateTime Object ( [date] => 2013-05-31 07:31:24.000181 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.12, 7.2.16
DateTime Object ( [date] => 2013-05-31 07:31:24.000141 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.15
DateTime Object ( [date] => 2013-05-31 07:31:24.000093 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.14
DateTime Object ( [date] => 2013-05-31 07:31:24.000151 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.13
DateTime Object ( [date] => 2013-05-31 07:31:24.000174 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.10
DateTime Object ( [date] => 2013-05-31 07:31:24.000117 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.1 - 7.2.2, 7.2.6 - 7.2.7, 7.2.9
DateTime Object ( [date] => 2013-05-31 07:31:24.000103 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.8
DateTime Object ( [date] => 2013-05-31 07:31:24.000118 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.5
DateTime Object ( [date] => 2013-05-31 07:31:24.000102 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.4
DateTime Object ( [date] => 2013-05-31 07:31:24.000122 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.3
DateTime Object ( [date] => 2013-05-31 07:31:24.000095 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.28, 7.2.0
DateTime Object ( [date] => 2013-05-31 07:31:24.000096 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.33
DateTime Object ( [date] => 2013-05-31 07:31:24.000168 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.32
DateTime Object ( [date] => 2013-05-31 07:31:24.000099 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.31
DateTime Object ( [date] => 2013-05-31 07:31:24.000194 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.30
DateTime Object ( [date] => 2013-05-31 07:31:24.000119 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.29
DateTime Object ( [date] => 2013-05-31 07:31:24.000120 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.27
DateTime Object ( [date] => 2013-05-31 07:31:24.000127 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.26
DateTime Object ( [date] => 2013-05-31 07:31:24.000106 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.20
DateTime Object ( [date] => 2013-05-31 07:31:24.003408 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.7
DateTime Object ( [date] => 2013-05-31 07:31:24.003664 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.6
DateTime Object ( [date] => 2013-05-31 07:31:24.012975 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.5
DateTime Object ( [date] => 2013-05-31 07:31:24.050091 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.0
DateTime Object ( [date] => 2013-05-31 07:31:24.005457 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.45, 5.5.14 - 7.0.20
DateTime Object ( [date] => 2013-05-31 07:31:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.0 - 5.4.29, 5.5.0 - 5.5.13
DateTime Object ( [date] => 2013-05-31 07:31:24 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.2.0 - 5.2.17
DateTime Object ( )
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/YBFRR 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/YBFRR 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/YBFRR on line 2