PHP object parent/child recursion
- by Damien
I've got a parent-child OO relationship. Parent obejcts has many child objects and every child object knows about it's parent by reference.
The parent can be a child too (basically its a tree).
When i do a var_dump() on the root object it says ["parent"]=RECURSION many times and the generated description will be really long.
I'm wondering if i do something wrong. If yes, i'm interested in the "best practice".
Thanks for the help!