PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 31 Mar 2015 15:47:01 -050030http://www.phpdeveloper.org/news/8124http://www.phpdeveloper.org/news/8124
In a new post, Derick Rethanstalks about circular references (a reference of a memory structure back to itself) and how they relate to PHP.

Circular-references has been a long outstanding issue with PHP. They are caused by the fact that PHP uses a reference counted memory allocation mechanism for its internal variables. This causes problems for longer running scripts (such as an Application Server or the eZ Components test-suite) as the memory is not freed until the end of the request. But not everybody is aware on what exactly the problem is, so here is a small introduction to circular references in PHP.

He starts by explaining what's so bad about circular references - issues not only with referencing the variable but also with freeing up the resources associated with it. He does suggest some solutions to the issue including garbage collection and cyclic tracing.