3 ms·
>Why on Earth does the parser need to know about empty? empty() doesn't issue a notice if the variable isn't set, like it would if it were an ordinary function
by eurleif 15y ago
>Why on Earth does the parser need to know about empty?
empty() doesn't issue a notice if the variable isn't set, like it would if it were an ordinary function. It's basically isset() with extra functionality. That makes it useful for checking form variables:
if (!empty($_POST['foo'])) { ... }