Re:Improve PHP Disk I/O & remove Race conditions by using '@...
by EvilTerran on Monday January 14, 2013 @06:59AM
(#5054300)
That's an interesting idea on the custom error handler, I wasn't aware that those trigger regardless of @s.
I guess a lot of the trouble with @ is that it affects everything that happens temporally-within the expression, but people often use it as if it only affects everything syntactically-within it... for instance, recently I came across something like:
... which would also hide any warnings that occur in the body of returns_a_list(), despite that being neither intended nor wanted.
It's a shame the only @-free solutions to many popular uses of @ (like that one) are so hideously ugly. Also that I suspect that changing @ so it only affected syntactically-contained errors would be... impractical for the PHP team, for a number of reasons.
I guess a lot of the trouble with @ is that it affects everything that happens temporally-within the expression, but people often use it as if it only affects everything syntactically-within it... for instance, recently I came across something like:
... which would also hide any warnings that occur in the body of returns_a_list(), despite that being neither intended nor wanted.It's a shame the only @-free solutions to many popular uses of @ (like that one) are so hideously ugly. Also that I suspect that changing @ so it only affected syntactically-contained errors would be... impractical for the PHP team, for a number of reasons.