<?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 = "2015-11-11 05:47:10";
if($date_fail->date > $date_recorded)
{
echo "date recorded = {$date_recorded} \n";
echo "date fail = {$date_fail['date']} \n";
echo "good to go";
}
else
echo "exception";
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
- Warning: Undefined property: DateTime::$date in /in/JcurS on line 8
exception
- Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
- Notice: Undefined property: DateTime::$date in /in/JcurS on line 8
exception
- Output for 7.3.32 - 7.3.33
- exception
preferences:
179.62 ms | 405 KiB | 208 Q