| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
Also, it doesn't appear to mention in the documentation, if a variable hasn't previously been declared, empty also returns true.
E.g.
var $bar;
empty( $bar ); // declared variable returns true.
empty( $foo ); // undeclared variable also returns true.
The closest the documentation comes to saying this is:
"var $var; (a variable declared, but without a value in a class)"
which isn't really the same, as the variable doesn't necessarily have to be declared first.
----
Server IP: 87.124.64.96
Probable Submitter: 83.216.141.253
----
Manual Page -- http://www.php.net/manual/en/function.empty.php
Edit -- https://master.php.net/note/edit/80106
Del: integrated -- https://master.php.net/note/delete/80106/integrated
Del: useless -- https://master.php.net/note/delete/80106/useless
Del: bad code -- https://master.php.net/note/delete/80106/bad+code
Del: spam -- https://master.php.net/note/delete/80106/spam
Del: non-english -- https://master.php.net/note/delete/80106/non-english
Del: in docs -- https://master.php.net/note/delete/80106/in+docs
Del: other reasons-- https://master.php.net/note/delete/80106
Reject -- https://master.php.net/note/reject/80106
Search -- https://master.php.net/manage/user-notes.php