Christian Schneider wrote:
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
It might just be me, but I thought there was a student with a google
summer of code project who was working on circular references and how to
properly free memory for them. Perhaps some of the algorithms devised
for that could be used to resolve problems as noted above?
- Tul
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php