PHP and Circular references
PHP, like most modern languages, has a garbage collection mechanism. It is supposed to destroy objects and variables as soon as there are no references to it anymore. To learn more about how it actually works, read this article. To summarize, PHP’s garbage handling is dumb, so any object that contains a circular reference will never be cleaned up. Normally, this doesn’t matter because a typical PHP request only takes a short amount of time and creates only a few objects. »