if (time() - strtotime("2010-07-04 10:19:26") > 60*60*24) { print "Older than 24h"; } else { print "Newer than 24h"; }