Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95527 invoked by uid 1010); 10 May 2004 01:07:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95438 invoked from network); 10 May 2004 01:07:25 -0000 Received: from unknown (HELO shiva.mind.de) (212.42.230.204) by pb1.pair.com with SMTP; 10 May 2004 01:07:25 -0000 Received: from BAUMBART (p508EBF92.dip.t-dialin.net [80.142.191.146]) by shiva.mind.de (Postfix) with ESMTP id C097197B58; Mon, 10 May 2004 03:07:23 +0200 (CEST) Date: Mon, 10 May 2004 03:07:27 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <119800405.20040510030727@marcus-boerger.de> To: Rui Hirokawa Cc: Andi Gutmans , internals@lists.php.net In-Reply-To: <20040510081537.966E.RUI_HIROKAWA@ybb.ne.jp> References: <20040509162726.5B3C.RUI_HIROKAWA@ybb.ne.jp> <5.1.0.14.2.20040509191720.035c6eb8@127.0.0.1> <20040510081537.966E.RUI_HIROKAWA@ybb.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Comparing objects on PHP5 From: helly@php.net (Marcus Boerger) Hello Rui, Monday, May 10, 2004, 1:24:33 AM, you wrote: > I performed the same test with HEAD (PHP 5.0.0RC3-dev (build: May 9 > 2004 10:16:50)). > There are no E_NOTICE message now, but, the problems are still existing with > RC2, > PHP 4.3.6 > same,not same,not same,same > same,not same,not same,same As long as we don't change this all is fine (because of BC). > PHP 5.0.0-CVS 2004/5/9 (ze1_compatibility_mode = Off) > same,not same,not same,same > not same,not same,not same,same The only think i am unsure is the first reult. But it makes pretty much sense the way it is now. It should compare all member variables and return equality if they are all equal. AFAIK it does so. The only difference to 4.3 then is the 5th result: class Foo { var $v = 1; } $a = new Foo; $b = new Foo; echo $a === $b ? "same," : "not same,"; In this example $a will be Object Id #1 and $b will become Object Id #2. Now tell me how those two could be identical? Every other resut than 'different' is simply bullshit. > PHP 5.0.0-CVS 2004/5/9 (ze1_compatibility_mode = On) > same,same,not same,same > not same,not same,not same,not same This should be the same as with 4.3. Since it obviously is not it must be fixed or the compatibility mode only provides weak compatibility and this will become a known issue. marcus