Yes there is, here‘s a nice article describing its pitfalls. In PHP > 5.3.0, there is also the gc_enable function.
More Related Contents:
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php [duplicate]
- Manipulate a string that is 30 million characters long
- Allowed memory size of X bytes exhausted
- How to fix memory getting exhausted with PHPExcel?
- Tracking Memory Usage in PHP
- memory_get_peak_usage() with “real usage”
- Can I trust PHP __destruct() method to be called?
- How can I debug exec() problems?
- How do I remove  from the beginning of a file?
- PDO MySQL: Use PDO::ATTR_EMULATE_PREPARES or not?
- .htaccess rewrite GET variables
- How to loop through a mysql result set
- Login without HTTPS, how to secure?
- Codeigniter: Passing data from controller to view
- CakePHP 2.0 – How to make custom error pages?
- How to sort date array in php?
- Use Javascript to access a variable passed through Twig
- Sorting multidim array: prioritize if column contains substring, then order by a second column
- How to handle double quotes in string before XPath evaluation?
- Easy way to export a SQL table without access to the server or phpMyADMIN
- How to set session timeout in Laravel?
- store_result() and get_result() in mysql returns false
- PHP PDO returning single row
- ffmpeg Progress Bar – Encoding Percentage in PHP
- How to parse a date string in PHP?
- How to separate letters and digits from a string in php
- utf8_(en|de)code removed from php7?
- PHP date time greater than today
- Copy file from remote server or URL [duplicate]
- Any way to break if statement in PHP?