PHP 8.5.0 Alpha 4 available for testing

Voting

: max(four, six)?
(Example: nine)

The Note You're Voting On

son9ne at gmail dot com
11 years ago
If you do use:
<?php
$filename
= 'somefile.txt';
$fmtime = filemtime($filename);
if (!
$fmtime) {
echo
"$filename wurde zuletzt modifiziert:: " . date ("F d Y H:i:s.", $fmtime);
}
?>

Make note that it will throw a warning as the documentation states. While tobias makes a good point for production, when error reporting is off, this can increase your performance over using `file_exists`. However, if error reporting is on and it's writing to a log... this is not the case. Obviously this varies on sever specs and the size of the error log. For most cases, it's still ideal to use the `file_exists` method.

<< Back to user notes page

To Top