ID:               40382
 Updated by:       [EMAIL PROTECTED]
 Reported By:      denis at bytezone dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: windows vista
 PHP Version:      5.2.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2007-02-07 09:35:07] denis at bytezone dot com

Description:
------------
When I create objects which contain a nested pointer back to itself, it
cannot be compared with another object for equality.

Error only occurs when the two objects being compared are the same
object.

Also, using === for comparison works correctly.



Reproduce code:
---------------
<?php

$thing = new Thing ();
$otherThing = new OtherThing ();

$thing->otherThing = $otherThing;
$otherThing->thing = $thing;

$thing2 = $thing;

if ($thing == $thing2)
  print "equal";
else
  print "not equal";

Class Thing
{
  public $otherThing;
}

Class OtherThing
{
  public $thing;
}
?>

Expected result:
----------------
I expect it to print 'equal'

Actual result:
--------------
Fatal error: Nesting level too deep - recursive dependency? in
D:\xampp\htdocs\scraping\test.php on line 11


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40382&edit=1

Reply via email to