<?php
function IsExpireData($data){
$dat0 = new DateTime
(date("Y-m-d G:i:s", mktime($g, $i, 0, $m, $d, $y))); $dat1 = new DateTime
(date("Y-m-d G:i:s"));
$ret = '';
if ($dat0 == $dat1) {
$ret = 0;
} else {
if ($dat1 < $dat0){
$ret = 1;
} else {
if ($dat1 > $dat0){
$ret = -1;
}
}
}
return $ret;
}
$d = IsExpireData("09/06/2014 14:00");
if ($d == 0 || $d == -1){
echo 'Expirado';
} else {
echo 'Ainda não expirou';
}
ICAgIDw/cGhwCiAgICAJZGF0ZV9kZWZhdWx0X3RpbWV6b25lX3NldCgnQW1lcmljYS9TYW9fUGF1bG8nKTsKICAgIAkKICAgIAlmdW5jdGlvbiBJc0V4cGlyZURhdGEoJGRhdGEpewogICAgCQkkZGF0YSA9IGV4cGxvZGUoIiAiLCAkZGF0YSk7CiAgICAJCWxpc3QoJGQsICRtLCAkeSkgPSBleHBsb2RlKCcvJywgJGRhdGFbMF0pOwogICAgCQlsaXN0KCRnLCAkaSkgICAgID0gZXhwbG9kZSgnOicsICRkYXRhWzFdKTsKICAgIAkJJGRhdDAgPSBuZXcgRGF0ZVRpbWUoZGF0ZSgiWS1tLWQgRzppOnMiLCBta3RpbWUoJGcsICRpLCAwLCAkbSwgJGQsICR5KSkpOwogICAgCQkkZGF0MSA9IG5ldyBEYXRlVGltZShkYXRlKCJZLW0tZCBHOmk6cyIpKTsKICAgIAkJCiAgICAJCSRyZXQgPSAnJzsKICAgIAkJaWYgKCRkYXQwID09ICRkYXQxKSB7CiAgICAJCQkkcmV0ID0gMDsKICAgIAkJfSBlbHNlIHsKICAgIAkJCWlmICgkZGF0MSA8ICRkYXQwKXsKICAgIAkJCQkkcmV0ID0gMTsKICAgIAkJCX0gZWxzZSB7CiAgICAJCQkJaWYgKCRkYXQxID4gJGRhdDApewogICAgCQkJCQkkcmV0ID0gLTE7CiAgICAJCQkJfQogICAgCQkJfQogICAgCQl9CiAgICAJCXJldHVybiAkcmV0OwogICAgCX0KICAgIAkKICAgIAkkZCA9IElzRXhwaXJlRGF0YSgiMDkvMDYvMjAxNCAxNDowMCIpOwogICAgCWlmICgkZCA9PSAwIHx8ICRkICA9PSAtMSl7CiAgICAJCWVjaG8gJ0V4cGlyYWRvJzsKICAgIAl9IGVsc2UgewogICAgCQllY2hvICdBaW5kYSBuw6NvIGV4cGlyb3UnOwogICAgCX0=