Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13391 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64532 invoked by uid 1010); 19 Oct 2004 14:11:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64291 invoked from network); 19 Oct 2004 14:11:01 -0000 Received: from unknown (HELO air638.startdedicated.com) (69.64.38.41) by pb1.pair.com with SMTP; 19 Oct 2004 14:11:01 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by air638.startdedicated.com (Postfix) with ESMTP id 45D41294321; Tue, 19 Oct 2004 09:06:07 -0500 (CDT) Received: from air638.startdedicated.com ([127.0.0.1]) by localhost (air638.startdedicated.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08851-07; Tue, 19 Oct 2004 09:06:07 -0500 (CDT) Received: from [192.168.11.2] (66-65-38-153.nyc.rr.com [66.65.38.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by air638.startdedicated.com (Postfix) with ESMTP id D97F7294245; Tue, 19 Oct 2004 09:06:06 -0500 (CDT) Message-ID: <41752070.8080101@php.net> Date: Tue, 19 Oct 2004 10:10:56 -0400 User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jevon Wright Cc: Benj Carson , internals@lists.php.net References: <4173E39D.1000509@gmx.net> <200410182251.00538.benjcarson@digitaljunkies.ca> <00ef01c4b5a5$e21d7870$0a00a8c0@home.jevon.org> In-Reply-To: <00ef01c4b5a5$e21d7870$0a00a8c0@home.jevon.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at bluga.net Subject: Re: [PHP-DEV] Nesting level too deep - recursive dependency? From: cellog@php.net (Greg Beaver) Jevon Wright wrote: > I first stumbled upon this problem in one of the RCs for PHP 5, but at the > time I thought I was at fault... > > Consider the documentation at > http://www.php.net/manual/en/language.oop5.object-comparison.php : the > documentation is a little vague, but it does say "Two object instances are > equal if they have the same attributes and values, and are instances of the > same class." Thus explaining the recursive loop... > > Maybe write a big flashing note in the documentation instead about this > trap? Better, if two values satisfy ===, they are clearly ==. I would imagine it would not be expensive to simply do a === check before doing the == check in the engine? Greg