I\'m trying to make something like this:
if (datetime - system date > 15 minutes) (false) if (datetime - system date
Try this
$interval = date_create($date_from_db)->diff(new \DateTime()); if ($interval->format('%r%l')>15) { $result = false; } else { $result = true; }