What is the correct function to use for getting the last modification time of a file in PHP?

To get the last modification time of a file in PHP, you can use the `filemtime()` function. This function returns the Unix timestamp of when the file was last modified. You can then use the `date()` function to format this timestamp into a human-readable date and time.

$filename = 'example.txt';
$lastModifiedTime = filemtime($filename);
$lastModifiedDateTime = date("Y-m-d H:i:s", $lastModifiedTime);
echo "Last modified time of $filename: $lastModifiedDateTime";