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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mmlyanrcik at charmed dot sk
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed May 08 20:01:36 2024 UTC