note 101976 deleted from function.in-array by cmb
| From: | cmb@php.net | Date: | Mon, 21 Jan 2019 14:16:57 +0000 |
| Subject: | note 101976 deleted from function.in-array by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210086@lists.php.net to get a copy of this message | ||
Note Submitter: bosdilooda at gmail dot com
----
There should be a big red warning sign here because this function behaves in mysterious ways...
let haystack be an array of integers:
$arr = array(1,2,3,4,5);
let $needle be a string of "2foobar"
then
in_array($needle,$arr)
will return true because string ("2foobar") evaluates to integer (2).