Jcart wrote:However, calling empty() an error supressor simply isn't right. It's purpose is not to supress errors.
It's purpose is to check variables without throwing an error even if the variable or array key doesn't exist.
If you'd want to reimplement it you'd have to use error suppression (not saying that the PHP core does that).
Which means:
I would use
except I get an error if it isn't set.
So how do I suppress this error and yet get the same result?
Use empty!
So what is the real reason I'm using empty?
To suppress errors!
Is that so hard to understand?
Jcart wrote:The @ error supressor temporarily sets the error reporting to 0, however empty() properly checks for the existance of the variable. I think it's pretty obvious which one lacks "semantics".
I wasn't comparing empty to @.