That's a really elegant solution... I'm up for trying that out. Remember to do != too :)
Jevon ----- Original Message ----- From: "Andi Gutmans" <[EMAIL PROTECTED]> To: "Greg Beaver" <[EMAIL PROTECTED]>; "Jevon Wright" <[EMAIL PROTECTED]> Cc: "Benj Carson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> 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 > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php