|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6239 object comparison w circular references leads to crash
Submitted: 2000-08-18 11:44 UTC Modified: 2001-07-15 14:54 UTC
From: Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (18/08/2000) OS: w2k, maybe all
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.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2000-08-18 11:44 UTC]
got another one ;)
of course this example is *extremely* different from my
example and I don?t know how we could handle circular
references in ordered and unordered comparisions with ease,
but *it should not crash* (taken from zeev) although it?d
expect it to... :)


echo $obj==$obj2;
echo $obj===$obj2;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-18 17:01 UTC]
Confirmed on latest CVS. Will look into it.
 [2000-11-27 05:25 UTC]
Isn't this fixed already?

 [2000-11-27 06:22 UTC]
no, still crashes w latest cvs
 [2000-12-30 12:04 UTC]
And crashes with Linux too..

 [2001-04-28 12:59 UTC]

class object1 {
  var $a;
  var $b;
  var $c;

$obj = new object1();
$obj2 = new object1();


echo ($obj==$obj2)?1:2;
echo ($obj===$obj2)?1:2;


still causes a stack overflow error. Perhaps we need to limit the depth the comparison follows too.
 [2001-07-15 14:54 UTC]
Fixed in the latest CVS (properly bails out) - will be a part of 4.0.7.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 22:05:52 2022 UTC