php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8015 in_array works only with equal variable types
Submitted: 2000-11-28 14:45 UTC Modified: 2000-11-28 14:54 UTC
From: mmlyanrcik at charmed dot sk Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.0.3pl1 OS: Slackware Linux 7.1
Private report: No CVE-ID: None
 [2000-11-28 14:45 UTC] mmlyanrcik at charmed dot sk
Hi,
 I don't know how it's possible but when i have an array which contains 0(zero) and then I use in_array where i'm looking if some string is in array it says OK string is in_array. Maybe when function should use comparision of variable types it could help.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-28 14:54 UTC] andrei@php.net
in_array() has third argument will enable strict comparison.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC