|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-02-04 17:16 UTC] php-dev at zerocue dot com
[2012-02-15 19:33 UTC] developer at suomedia dot com
[2016-08-26 13:49 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Description: ------------ functions that return FALSE on error should not also emit a warning. Example: filemtime(). it is sufficient to check if the file exists and retrieve the mtime by doing: if ($mtime = filemtime()) { echo date('ymd', $mtime); } else { echo 'file does not exist'; } supressing the warning with "@" is slow and generates an error in the log (also slow). checking if the file exists before retrieving the mtime is also wasteful. Expected result: ---------------- filemtime and other functions that emit a warning on error when false is also returned should not emit a warning.