PHP: Getting Last Modification Time of a File – File mtime

File mtime is the last modified time of the file or the time when the last modification of the file content occurred. To get the last modified time of the file in PHP, use:

$last = filemtime('anyfile');

Read more about how to get the ctime and atime in PHP.

2 thoughts on “PHP: Getting Last Modification Time of a File – File mtime”

  1. Pingback: PHP: Getting Last Accessed Time of a File – File atime

  2. Pingback: PHP: Getting Last Changed Time of a File – File ctime

Comments are closed.

Scroll to Top