3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = new DateTime; $prop = new ReflectionProperty(new DateTime, 'date'); var_dump($data); var_dump($prop->getValue($data));
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught ReflectionException: Property DateTime::$date does not exist in /in/1Z5Wl:4 Stack trace: #0 /in/1Z5Wl(4): ReflectionProperty->__construct(Object(DateTime), 'date') #1 {main} thrown in /in/1Z5Wl on line 4
Process exited with code 255.
Output for 7.3.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 14:20:20.002458" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } string(26) "2013-07-08 14:20:20.002458"
Output for 7.3.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 14:20:20.002569" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } string(26) "2013-07-08 14:20:20.002569"
Output for 7.3.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.003246" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.003246"
Output for 7.3.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.003252" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.003252"
Output for 7.3.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.010081" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.010081"
Output for 7.3.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.011611" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.011611"
Output for 7.3.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.010683" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.010683"
Output for 7.3.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.008599" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.008599"
Output for 7.3.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.009062" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.009062"
Output for 7.3.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.008136" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.008136"
Output for 7.3.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.008824" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.008824"
Output for 7.3.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.009607" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.009607"
Output for 7.3.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.009738" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.009738"
Output for 7.3.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.008277" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.008277"
Output for 7.3.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.004336" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.004336"
Output for 7.3.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.010913" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.010913"
Output for 7.3.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.009086" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.009086"
Output for 7.2.19, 7.3.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000219" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000219"
Output for 7.3.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000230" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000230"
Output for 7.2.21, 7.3.3, 7.3.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000214"
Output for 7.3.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000223" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000223"
Output for 7.3.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000183" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000183"
Output for 7.3.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000224" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000224"
Output for 7.3.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000174" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000174"
Output for 7.3.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000181" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000181"
Output for 7.3.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000182" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000182"
Output for 7.1.30, 7.3.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000109" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000109"
Output for 7.3.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000195" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000195"
Output for 7.3.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000110" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000110"
Output for 7.2.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.009976" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.009976"
Output for 7.2.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.008841" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.008841"
Output for 7.2.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.011451" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.011451"
Output for 7.2.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.009764" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.009764"
Output for 7.2.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.008560" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.008560"
Output for 7.2.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000194" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000194"
Output for 7.2.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000226" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000226"
Output for 7.2.23
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000203" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000203"
Output for 7.2.22
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000144" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000144"
Output for 7.2.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000173" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000173"
Output for 7.2.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000137" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000137"
Output for 7.2.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000153" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000153"
Output for 7.2.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000150" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000150"
Output for 7.2.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000130" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000130"
Output for 7.2.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000116" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000116"
Output for 7.2.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000164" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000164"
Output for 7.2.11 - 7.2.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000082" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000082"
Output for 7.2.9 - 7.2.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000080" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000080"
Output for 7.2.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000100" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000100"
Output for 7.2.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000156" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000156"
Output for 7.2.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000091" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000091"
Output for 7.2.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000147" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000147"
Output for 7.2.0, 7.2.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000090" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000090"
Output for 7.2.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000092" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000092"
Output for 7.2.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.028429" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.028429"
Output for 7.2.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.044424" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.044424"
Output for 7.1.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000154" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000154"
Output for 7.1.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000191" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000191"
Output for 7.1.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000112" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000112"
Output for 7.1.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000135" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000135"
Output for 7.1.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000113" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000113"
Output for 7.1.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000169" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000169"
Output for 7.1.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000106" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000106"
Output for 7.1.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000087" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000087"
Output for 7.1.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.003800" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.003800"
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.004486" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.004486"
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.003226" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.003226"
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.011405" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.011405"
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.012518" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.012518"
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.004004" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.004004"
Output for 5.6.28, 7.0.14 - 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 16:20:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 16:20:20.000000"
Output for 5.4.30 - 5.4.45, 5.5.14 - 5.5.36, 5.6.0 - 5.6.22, 7.0.0 - 7.0.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-07-08 18:20:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(26) "2013-07-08 18:20:20.000000"
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.29, 5.5.0 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2013-07-08 18:20:20" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(19) "2013-07-08 18:20:20"
Output for 5.2.0 - 5.2.17
Fatal error: Uncaught exception 'ReflectionException' with message 'Property DateTime::$date does not exist' in /in/1Z5Wl:4 Stack trace: #0 /in/1Z5Wl(4): ReflectionProperty->__construct(Object(DateTime), 'date') #1 {main} thrown in /in/1Z5Wl on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/1Z5Wl on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/1Z5Wl 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/1Z5Wl on line 3

preferences:
260.23 ms | 401 KiB | 393 Q