The filemtime () PHP function retrieves the Unix timestamp from the file itself of when the file was last being written. This can show us when a file was last modified.
$last_mod = filemtime("filename.php");
print("Last Edited on ");
print(date("m/j/y h:i", $last_mod));
Be sure to replace "filename.php" with the actual name of the file you are checking on. This could be the file where you are printing the last modified date, or it could be an outside file you are checking on.