Re: Nesting level too deep - recursive dependency?
| From: | Jevon Wright | Date: | Tue, 19 Oct 2004 22:48:54 +0000 |
| Subject: | Re: Nesting level too deep - recursive dependency? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13404@lists.php.net to get a copy of this message | ||
That's a really elegant solution... I'm up for trying that out. Remember to
do != too :)
Jevon
----- Original Message -----
From: "Andi Gutmans" <andi@zend.com>
To: "Greg Beaver" <cellog@php.net>; "Jevon Wright" <jevon@jevon.org>
Cc: "Benj Carson" <benjcarson@digitaljunkies.ca>; <internals@lists.php.net>
Sent: Wednesday, October 20, 2004 6:46 AM
Subject: Re: [PHP-DEV] Nesting level too deep - recursive dependency?
> At 10:10 AM 10/19/2004 -0400, Greg Beaver wrote:
> >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?
>
> That might actually be a good idea. It would definitely solve some
> headaches and be faster.
> Does anyone object to me doing this?
>
> Andi
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>