I know that in PHP you don't have to free memory. Is it reached by garbage collector?
+2
A:
PHP has a combination of garbage collection and reference counting. The latter is the main mode of managing memory, with the garbage collector picking up the pieces that the ref counter misses (circular references). Before 5.3, php only had ref-counting, and even in 5.3 it's the still how memory will usually be freed.
troelskn
2009-11-14 22:49:08
A:
Since 5.3.0 you can force garbage collection using gc_collect_cycles function
W.Ed.
2010-04-06 14:23:06