note 100408 added to function.empty
| From: | dbergan at gmail dot com | Date: | Thu, 14 Oct 2010 05:01:43 +0000 |
| Subject: | note 100408 added to function.empty | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173207@lists.php.net to get a copy of this message | ||
I ran into issues with empty() behaving counter-intuitively when I was checking user-input via
forms... so I spent a few hours testing empty() and its siblings isset(), is_null(), and strlen()
and put the results in a large table on my site to clarify their behavior and highlighted the areas
that might get a programmer in trouble. Hope you find this useful.
http://www.davidbergan.com/Summa/Php
Kind regards,
David
----
Server IP: 64.71.164.2
Probable Submitter: 96.2.101.219
----
Manual Page -- http://www.php.net/manual/en/function.empty.php
Edit -- https://master.php.net/note/edit/100408
Del: integrated -- https://master.php.net/note/delete/100408/integrated
Del: useless -- https://master.php.net/note/delete/100408/useless
Del: bad code -- https://master.php.net/note/delete/100408/bad+code
Del: spam -- https://master.php.net/note/delete/100408/spam
Del: non-english -- https://master.php.net/note/delete/100408/non-english
Del: in docs -- https://master.php.net/note/delete/100408/in+docs
Del: other reasons-- https://master.php.net/note/delete/100408
Reject -- https://master.php.net/note/reject/100408
Search -- https://master.php.net/manage/user-notes.php