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
 [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 Mar 29 08:01:27 2024 UTC