- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$d1 = '2014-08-05 20:30:11';
$d2 = '2014-08-07 17:35:21';
$t1 = strtotime($d1);
$t1 = strtotime('3 days ago');
$t2 = strtotime($d2);
echo date('H:i:s - d/m/Y', $t1)."\t\r\n";
echo date('H:i:s - d/m/Y', $t2)."\t\r\n";
echo ($t2 > $t1)."\t\r\n";