How can the filemtime function in PHP be used to track the last modification date of a file?

The filemtime function in PHP can be used to track the last modification date of a file by returning the Unix timestamp of when the file was last modified. To use this function, you simply need to pass the file path as a parameter, and it will return the timestamp of the last modification date.

$filePath = 'path/to/your/file.txt';
$lastModified = filemtime($filePath);

echo "Last modified date: " . date("F d Y H:i:s.", $lastModified);