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
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: 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: Sun Apr 28 19:01:28 2024 UTC