[UPHPU] @include_once bad?
jim
thinbegin at gmail.com
Fri Mar 27 11:09:30 MDT 2009
> Why? if the file is not required (we only want to include it if it exists),
> why do we need to check if it exists? if it doesn't and the include fails,
> what's the consequence? is there one?
There is no consequence really. Just more of a best practices
methodology. Like I previously posted, using @ to suppress is fine, it
just isn't necessarily best practice.
One thing does come to mind with the @ [suppression], I have use that
and still had the error report/display, maybe fluke related or maybe
php.ini setting related, it's been a while and I don't remember the
details.
Another benefit that I would consider, but may not pertain to you
scenario [or you just may not care], is that @ suppression will
suppress the error to the user, but it still gets reported to log
files and, depending on site volume/usage/server/grepping/etc, seems
like an easily avoidable line entry into a log that can get pretty
beefy, which suxors for parsing and storing. :)
Just a couple of thoughts there. Chew 'em over, if you like.
More information about the UPHPU
mailing list