3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $diff = DateTime::diff(DateTime::createFromFormat('Y-m-d', '1999-09-08'), DateTime::createFromFormat('Y-m-d', '1999-01-15')); print_r($diff);
based on P4KOV
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Non-static method DateTime::diff() cannot be called statically in /in/eEPo3:3 Stack trace: #0 {main} thrown in /in/eEPo3 on line 3
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Non-static method DateTime::diff() cannot be called statically in /in/eEPo3 on line 3
Process exited with code 255.