What is the function in PHP to retrieve the modification date of a file?

To retrieve the modification date of a file in PHP, you can use the `filemtime()` function. This function returns the time when the data blocks of a file were being written to, which is usually the last modification time. You can pass the file path as a parameter to the `filemtime()` function to get the modification date in Unix timestamp format.

$file = 'example.txt';
$modification_date = filemtime($file);

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