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
 [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: Wed Jul 24 12:01:28 2024 UTC