php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #633 PHP compares arrays wrongly
Submitted: 1998-08-08 22:56 UTC Modified: 1998-08-13 16:23 UTC
From: mlemos at acm dot org Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Final Release OS: Amiga OS
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: mlemos at acm dot org
New email:
PHP Version: OS:

 

 [1998-08-08 22:56 UTC] mlemos at acm dot org
It seems that PHP either is not ready to compare arrays or
it just compares different arrays wrongly saying they are
equal.

Just try this:

<?
   $array_1=array("1");
   $array_2=array("2");
   if($array_1!=$array_2)
    echo "Different\n";
   else
    echo "Equal\n";
?>

If  PHP is not ready to compare arrays or objects for the matter, it should
issue  an  error or a warning at least when you have error reporting set to
15.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-13 16:23 UTC] zeev
This now generates a warning.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC