Re: Nesting level too deep - recursive dependency?
| From: | Andi Gutmans | Date: | Tue, 19 Oct 2004 17:46:48 +0000 |
| Subject: | Re: Nesting level too deep - recursive dependency? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13395@lists.php.net to get a copy of this message | ||
At 10:10 AM 10/19/2004 -0400, Greg Beaver wrote:
Jevon Wright wrote:That might actually be a good idea. It would definitely solve some headaches and be faster. Does anyone object to me doing this? AndiI 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?