Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9825 invoked by uid 1010); 6 Jun 2007 13:04:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9810 invoked from network); 6 Jun 2007 13:04:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2007 13:04:56 -0000 Authentication-Results: pb1.pair.com header.from=mark@cyanox.nl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mark@cyanox.nl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cyanox.nl from 77.248.52.200 cause and error) X-PHP-List-Original-Sender: mark@cyanox.nl X-Host-Fingerprint: 77.248.52.200 unknown Received: from [77.248.52.200] ([77.248.52.200:47659] helo=a191140.upc-a.chello.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/10-03203-7F0B6664 for ; Wed, 06 Jun 2007 09:04:56 -0400 Received: from [10.134.233.160] (tiscom1.xs4all.nl [::ffff:62.251.5.114]) (AUTH: LOGIN mark, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by a191140.upc-a.chello.nl with esmtp; Wed, 06 Jun 2007 15:05:20 +0200 id 000000000164C001.000000004666B110.00004E13 Message-ID: <4666B0C7.80206@cyanox.nl> Date: Wed, 06 Jun 2007 15:04:07 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061115 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: Antony Dovgal CC: php-dev References: <4665D15F.2040501@cyanox.nl> <4665D357.5070509@zend.com> <4665E1BF.5090107@cyanox.nl> <46664FBC.5070102@zend.com> <46665D62.7090009@cyanox.nl> <4666A2A4.2070305@zend.com> In-Reply-To: <4666A2A4.2070305@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Recursive classes ... possible bug? From: mark@cyanox.nl ("mark@cyanox.nl") Antony Dovgal wrote: > On 06.06.2007 11:08, mark@cyanox.nl 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. > Thanks and keep up the good work! Greetings, Mark Sanders.