[UPHPU] @include_once bad?
Wade Preston Shearer
wadeshearer.lists at me.com
Fri Mar 27 09:43:13 MDT 2009
On 27 Mar 2009, at 9:40, Kevin wrote:
> And I quote:
> "Error suppression is slow. This is because PHP dynamically changes
> error_reporting to 0 before executing the suppressed statement, then
> immediately changes it back. This is expensive."
>
> Using error suppression is always a bad thing. It makes debugging in
> the
> future much more difficult. If you want to include only files that
> exist
> just wrap it in an if ( file_exists($file) ). This makes the code
> much more
> clearer and you don't sacrifice missing other potential errors that
> include_once might throw.
Thank you. That is the answer I was looking for.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2431 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20090327/feaedd87/smime-0001.bin
More information about the UPHPU
mailing list