On 06.06.2007 11:08, [EMAIL PROTECTED] wrote:
Why?
The behavior is quite clear - if the objects are instances of the same class, we have no other way to compare them but to compare their properties, this also applies to properties' properties and properties' properties' properties etc.
Well yes but in this case they are the same instance. Comparing the properties is then useless since they will always be the same.

Well there could be made a check to see if the objects are the same instance (like with ===) before actually checking the properties.

Hm.. I was actually a bit surprised to see that we don't do "===" before doing 
"==" on objects.
That would of course prevent the recursion in case of comparing an object to 
itself.

I committed a patch minute ago, but it obviously won't change the case when the objects are different and contain circular references.
Anyway, thanks a lot for pointing this out.

--
Wbr, Antony Dovgal

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to