3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime = new DateTime(); echo $datetime->date; var_dump($datetime); echo $datetime->date;
Output for 7.3.1
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000127" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000127
Output for 7.1.25, 7.3.0
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000150" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000150
Output for 7.2.13
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000101" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000101
Output for 7.2.12
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000141" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000141
Output for 7.2.11
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000164" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000164
Output for 7.2.10
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000094" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000094
Output for 7.2.9
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000149" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000149
Output for 7.2.0, 7.2.8
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000075" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000075
Output for 7.2.7
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000078" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000078
Output for 7.2.6
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000076" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000076
Output for 7.2.5
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000099" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000099
Output for 7.2.3 - 7.2.4
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000073" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000073
Output for 7.2.2
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000077" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000077
Output for 7.2.1
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000096" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000096
Output for 7.1.20
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.002859" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.002859
Output for 7.1.10
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.003967" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.003967
Output for 7.1.7
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.004986" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.004986
Output for 7.1.6
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.012315" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.012315
Output for 7.1.5
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.007660" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.007660
Output for 7.1.4
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.008720" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.008720
Output for 5.4.30 - 5.4.45, 5.5.14 - 5.6.30, 7.0.0 - 7.0.20, 7.1.3
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.000000
Output for 7.1.2
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.011948" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.011948
Output for 7.1.1
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.002887" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.002887
Output for 7.1.0
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:56.004995" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56.004995
Output for hhvm-3.10.1 - 3.11.1, hhvm-3.13.2 - 3.17.3
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-10-23 23:01:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Notice: Undefined property: DateTime::$date in /in/7sn3C on line 9
Output for hhvm-3.12.14

Process exited with code 137.
Output for 5.3.0 - 5.4.29, 5.5.0 - 5.5.13
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (3) { ["date"]=> string(19) "2013-10-23 23:01:56" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 2013-10-23 23:01:56
Output for 5.2.6 - 5.2.17
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (0) { } Notice: Undefined property: DateTime::$date in /in/7sn3C on line 9
Output for 5.2.0 - 5.2.5
Notice: Undefined property: DateTime::$date in /in/7sn3C on line 5 object(DateTime)#1 (0) { } Notice: Undefined property: DateTime::$date in /in/7sn3C on line 9
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/7sn3C on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/7sn3C 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/7sn3C on line 3