This function is like filemtime() but just for the file it’s used in. That is, it will give you a timestamp of when the file was written to.

$t1 = getlastmod();        // 1249092497
$t2 = filemtime(__FILE__); // 1249092497