Search code examples
memory-leaksphp4

How to clear garbage in PHP 4


I have written an application. But there is an issue of memory overflowing. Is there a way to clear all garbage values in PHP 4?


Solution

  • I think more information about your specific case and environment (I am just guessing that you are running PHP from a web server and not CLI) is needed. And you should look through your entire code yourself for places that can be optimized.

    As you probably know, garbage collection is not a part of PHP 4. Check out unset and http://www.obdev.at/developers/articles/00002.html for some pointers.