3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = new DateTime; $e = new DateTime('2013-09-10'); var_dump($d - $e);
Output for 5.3.28 - 5.3.29, 5.4.20 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Object of class DateTime could not be converted to int in /in/5cF0A on line 5 Notice: Object of class DateTime could not be converted to int in /in/5cF0A on line 5 int(0)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.0 - 5.3.27, 5.4.0 - 5.4.19
Notice: Object of class DateTime could not be converted to int in /in/IUEkp on line 5 Notice: Object of class DateTime could not be converted to int in /in/IUEkp on line 5 int(0)
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/IUEkp 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/IUEkp on line 3
Process exited with code 255.
Output for 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/IUEkp on line 3
Output for 4.3.0
Fatal error: Cannot instantiate non-existent class: datetime in /in/5cF0A on line 3