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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun May 05 09:01:30 2024 UTC