deep compare: nesting level too deep

From: Date: Sat, 25 Jan 2003 00:00:53 +0000
Subject: deep compare: nesting level too deep
Groups: php.dev 
Request: Send a blank email to php-dev+get-93644@lists.php.net to get a copy of this message
Hello list, I seem to have weird kinds of problems. I probably use some very unusual ways to program. I wonder if it's good or bad. ;-) I have an object that has a member variable that is an array whose elements are references to other ("child") objects. Those child objects, in turn, hold a reference to the "parent" object. When I try to compare two "child" objects, PHP says: "Fatal error: Nesting level too deep - recursive dependency?". Well, yes, it _is_ a recursive dependency, but I don't see why PHP could not compare those objects anyway? Isn't it possible to tell whether two "names" reference the same "variable"? In fact, I'm comparing two references to the very same object, so the comparison could stop right there and not compare any members of the object. Vaclav Dvorak <vdvo@vdvo.net> PS: Any new ideas, opinions or fact on my foreach problem?

« previous php.dev (#93644) next »