Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30118 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53350 invoked by uid 1010); 6 Jun 2007 16:57:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53334 invoked from network); 6 Jun 2007 16:57:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2007 16:57:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=cellog@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cellog@php.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 66.79.163.178 cause and error) X-PHP-List-Original-Sender: cellog@php.net X-Host-Fingerprint: 66.79.163.178 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from [66.79.163.178] ([66.79.163.178:32778] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/A0-42317-367E6664 for ; Wed, 06 Jun 2007 12:57:07 -0400 Received: from mail.bluga.net (mail.bluga.net [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 6752B8738A; Wed, 6 Jun 2007 10:00:33 -0700 (PDT) Received: from [192.168.1.105] (ftcl002.digis.net [66.17.140.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 6A0EA87363; Wed, 6 Jun 2007 10:00:31 -0700 (PDT) Message-ID: <4666E755.6010609@php.net> Date: Wed, 06 Jun 2007 11:56:53 -0500 User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Antony Dovgal CC: "mark@cyanox.nl" , 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 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] Recursive classes ... possible bug? From: cellog@php.net (Greg Beaver) 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. This is especially surprising because I mentioned this in Oct. 2004 (http://groups.google.com/group/mailing.www.php-dev/msg/c3bcb36e5c6eb07b?dmode=source&hl=en) and Andi took this on: http://groups.google.com/group/mailing.www.php-dev/msg/4429a975af7e4924?dmode=source&hl=en then claimed to have fixed it: http://groups.google.com/group/mailing.www.php-dev/msg/6ad9e1b23bf4862e?dmode=source&hl=en However, a scan of all CVS commits between Oct. 19-21 at news.php.net (this took a while) revealed no commits at all, and looking at zend_operators.c in both Zend/ and ZendEngine2 reveals no commits by Andi anywhere near this time. Sounds like it just slipped through the cracks somehow. Greg