note 43928 deleted from function.array-search by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 08 Jul 2004 21:52:08 +0000 |
| Subject: | note 43928 deleted from function.array-search by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72899@lists.php.net to get a copy of this message | ||
Note Submitter: riseofthethorax@yahoo.com
----
Note however that Boolean False = 0 = "". The only way to have the search return a valid
result and treat non-result as false is to start indices at 1.. The problem is that PHP always
equated false to 0, but in some languages (unlike C), 0 is not false.. PHP needs a way to handle
exceptions because this would be the only way to seperate a result from an error. Otherwise users
will continue to make mistakes like the ones above..