3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = mktime(1, 10, 5, 1, 1, 1973); var_dump($start); for($dt=$start, $f=0;$f<7;$f++){ $dt->add(new DateInterval("P1D")); var_dump($dt); } ?>
Output for 7.0.0 - 7.1.0
int(94695005) Fatal error: Uncaught Error: Call to a member function add() on integer in /in/KNucr:5 Stack trace: #0 {main} thrown in /in/KNucr on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
int(94695005) Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function add() on a non-object (integer)' in /in/KNucr:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.7 - 5.6.28
int(94695005) Fatal error: Call to a member function add() on integer in /in/KNucr on line 5
Process exited with code 255.
Output for 5.0.0 - 5.5.35
int(94695005) Fatal error: Call to a member function add() on a non-object in /in/KNucr on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
int(94695005) Fatal error: Call to a member function on a non-object in /in/KNucr on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
int(94695005) Fatal error: Call to a member function on a non-object in /in/KNucr on line 5