Bug #67927 [Opn->Nab]: in_array returns false searching for the word 'array'
| From: | aharvey@php.net | Date: | Thu, 28 Aug 2014 21:00:56 +0000 |
| Subject: | Bug #67927 [Opn->Nab]: in_array returns false searching for the word 'array' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-187327@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67927&edit=1
ID: 67927
Updated by: aharvey@php.net
Reported by: jhackwell at docmagic dot com
Summary: in_array returns false searching for the word
'array'
-Status: Open
+Status: Not a bug
Type: Bug
Package: Arrays related
Operating System: Centos 6.5
PHP Version: 5.6.0
Block user comment: N
Private report: N
New Comment:
You have a non-breaking space at the start of the 'array' in your $arr definition, hence
the in_array() fails.
Previous Comments:
------------------------------------------------------------------------
[2014-08-28 20:59:12] jhackwell at docmagic dot com
Description:
------------
The in_array function does not seem to be able to find the word 'array' inside an array.
Test script:
---------------
$arr = array(
'âarray',
);
echo in_array('array', $arr) ? 'it\'s there' : 'it\'s not
there';
Expected result:
----------------
it's there
Actual result:
--------------
it's not there
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67927&edit=1