I'm wondering if there is any way to systematically trace object instance creation / duplication throughout a PHP script:
Over the past year, I worked on a Content Management System in PHP. It is Object Oriented, I used references where appropriate to avoid an enormous duplication of objects and made sure the different Classes staid as lightweight as possible.
After I started including code interacting with database objects in classes that inhertied from the "Paragraph" class, I found out that some objects where created several times. Image adding a "counter" element to a page to find that it counts 4 hits for each page visit... 😕
By now, I think I traced most coding errors (missing &'s and so on) and it seems to be working fine. :rolleyes: Nevertheless, I am not totally confident that I traced all errors and imagine that this would be a structural problem.