note 31103 added to function.in-array
| From: | isthar at rack1 dot php dot net | Date: | Wed, 09 Apr 2003 21:25:43 +0000 |
| Subject: | note 31103 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46428@lists.php.net to get a copy of this message | ||
It happens because a non-empty string cast to bool is true, so it is in the array. If you check for
types (strict = true), things won't go "wrong".
--
http://www.php.net/manual/en/function.in-array.php
http://master.php.net/manage/user-notes.php?action=edit+31103
http://master.php.net/manage/user-notes.php?action=delete+31103
http://master.php.net/manage/user-notes.php?action=reject+31103