Re: Recursive classes ... possible bug?

From: Date: Wed, 06 Jun 2007 10:32:56 +0000
Subject: Re: Recursive classes ... possible bug?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-30112@lists.php.net to get a copy of this message
Daniel Penning wrote: > Checking if the reference is equal and then doing the member-by-member > comparison if they differ would prevent too deep recursion in most cases. That would solve this particular case (and might be worth doing for performance reasons anyway I'd say) but won't solve the general problem. Imagine comparing o1->o2->o1 (object 1 having a reference to object 2 which in turn has a reference back to object 1) with o3->o4->o3. You'd still get the same result as now (nesting too deep) and there is no easy way around it. - Chris

« previous php.internals (#30112) next »