<?php
$future_unix_time = "1542807180";
$now = new DateTime();
$now->add(new DateInterval('PT3H'));
$check_time = DateTime::createFromFormat('U', $future_unix_time);
// echo $now->format('M-d-Y H:i:s');
if($now->format('U') <= $check_time)
$state = "less";
else
$state = "greater";
echo sprintf("%s is %s than %s", $now->format('Y-m-d H:i:s'), $state, $check_time->format('Y-m-d H:i:s'));
PD9waHAKCiRmdXR1cmVfdW5peF90aW1lID0gIjE1NDI4MDcxODAiOwoKJG5vdyA9IG5ldyBEYXRlVGltZSgpOwokbm93LT5hZGQobmV3IERhdGVJbnRlcnZhbCgnUFQzSCcpKTsKJGNoZWNrX3RpbWUgPSBEYXRlVGltZTo6Y3JlYXRlRnJvbUZvcm1hdCgnVScsICRmdXR1cmVfdW5peF90aW1lKTsKLy8gZWNobyAkbm93LT5mb3JtYXQoJ00tZC1ZIEg6aTpzJyk7CmlmKCRub3ctPmZvcm1hdCgnVScpIDw9ICRjaGVja190aW1lKQoJJHN0YXRlID0gImxlc3MiOwplbHNlCgkkc3RhdGUgPSAiZ3JlYXRlciI7CgkKZWNobyBzcHJpbnRmKCIlcyBpcyAlcyB0aGFuICVzIiwgJG5vdy0+Zm9ybWF0KCdZLW0tZCBIOmk6cycpLCAkc3RhdGUsICRjaGVja190aW1lLT5mb3JtYXQoJ1ktbS1kIEg6aTpzJykpOwk=