3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dStart = new DateTime(); $dEnd = new DateTime('2017-07-12'); $dDiff = $dStart->diff($dEnd); var_dump($dDiff->d);
Output for 5.3.0
int(4)
Output for 5.2.17
Fatal error: Call to undefined method DateTime::diff() in /in/KgXLt on line 4
Process exited with code 255.