3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $closeTs = new DateTime($record->CloseTime); var_dump($closeTs["date"]);
Output for 7.2.0
Notice: Undefined variable: record in /in/0QUhA on line 3 Notice: Trying to get property 'CloseTime' of non-object in /in/0QUhA on line 3 Fatal error: Uncaught Error: Cannot use object of type DateTime as array in /in/0QUhA:5 Stack trace: #0 {main} thrown in /in/0QUhA on line 5
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Notice: Undefined variable: record in /in/0QUhA on line 3 Notice: Trying to get property of non-object in /in/0QUhA on line 3 Fatal error: Uncaught Error: Cannot use object of type DateTime as array in /in/0QUhA:5 Stack trace: #0 {main} thrown in /in/0QUhA on line 5
Process exited with code 255.
Output for 5.2.0 - 5.6.28
Notice: Undefined variable: record in /in/0QUhA on line 3 Notice: Trying to get property of non-object in /in/0QUhA on line 3 Fatal error: Cannot use object of type DateTime as array in /in/0QUhA on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/0QUhA 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/0QUhA 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/0QUhA on line 3