3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $disconnect = "2015-11-07"; $disco_date = date_create($disconnect); $date_fail = date_add($disco_date, date_interval_create_from_date_string("60 days")); $date_recorded = "2016-11-11 05:47:10"; if($date_fail > $date_recorded) { echo "date recorded = {$date_recorded} \n"; echo "date fail = {$date_fail} \n"; echo "good to go"; } else echo "exception";
based on pIS0p
Output for 7.1.0 - 7.2.0
date recorded = 2016-11-11 05:47:10 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/PpcJ8 on line 11
Process exited with code 255.
Output for 5.3.19 - 7.0.20
date recorded = 2016-11-11 05:47:10 Catchable fatal error: Object of class DateTime could not be converted to string in /in/PpcJ8 on line 11
Process exited with code 255.