3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = "2/7/2013"; echo (date("Ymd", strtotime($date))) . "\n"; $date = new DateTime($date); echo $date->format('Y-m-d H:i:sP') . "\n"; $currTime = new DateTime(); $sendReminder=$date->diff($currTime); echo $sendReminder->format('Y-m-d H:i:sP') . "\n"; var_dump($date->invert);
Output for 5.3.0 - 7.1.0
20130207 2013-02-07 00:00:00+01:00 Y-m-d H:i:sP Notice: Undefined property: DateTime::$invert in /in/2o08g on line 11 NULL
Output for 5.2.0 - 5.2.17
20130207 2013-02-07 00:00:00+01:00 Fatal error: Call to undefined method DateTime::diff() in /in/2o08g on line 9
Process exited with code 255.
Output for 5.0.0 - 5.1.6
20130207 Fatal error: Class 'DateTime' not found in /in/2o08g on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
20130207 Fatal error: Cannot instantiate non-existent class: datetime in /in/2o08g on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
20130207 Fatal error: Cannot instantiate non-existent class: datetime in /in/2o08g on line 6