note 41396 deleted from function.array-search by felipe
| From: | felipe@php.net | Date: | Sun, 10 Feb 2008 13:10:48 +0000 |
| Subject: | note 41396 deleted from function.array-search by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135961@lists.php.net to get a copy of this message | ||
Note Submitter: pascal at hillrippers dot ch
----
@@ apolion at loliart dot com:
a thought to your example:
the $key you get from your array_search is "0" (0 => 'blue'). And as for me,
0 ist the same as FALSE, so your
<?php
if($key == false)
?>
hast to evaluate to true.
after that, with the '===' -operand, you additionally compare the type of the variable
and your statement evaluates to false, because 0 !== false.
so everything seems to be okay for me. =)