php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9219 Typecasting in array_diff/intersect
Submitted: 2001-02-11 18:16 UTC Modified: 2001-02-12 01:37 UTC
From: chuck at leaseyourmind dot com Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.0.4pl1 OS: Linux
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: chuck at leaseyourmind dot com
New email:
PHP Version: OS:

 

 [2001-02-11 18:16 UTC] chuck at leaseyourmind dot com
I do beleive that array_diff/intersect rely to heavily on the value's type. 

A string '1' and integer 1 do not seem to be the same value as far as these two functions are concerned.

This is an annoying little factoid to discover when attempting to use one of the functions with mysql data.

If it's not a bug, please verify, then stick the info into the php manual.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-12 01:37 UTC] venaas@php.net
Fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 04:01:30 2024 UTC