note 95067 added to function.preg-replace-callback
| From: | Skippy at osu1 dot php dot net | Date: | Fri, 11 Dec 2009 14:07:55 +0000 |
| Subject: | note 95067 added to function.preg-replace-callback | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-163854@lists.php.net to get a copy of this message | ||
tijn's currying example is very nice, but, like any use of create_function(), it leaves behind
tons of occupied memory, because it creates an anonymous function for every variation of parameters.
And since there's no "destroy_function()" which would allow us to reclaim that
memory, given enough calls you may end up maxing out the PHP memory limit. So be very careful if you
use that technique across large amounts of iterations.
----
Server IP: 69.147.83.197
Probable Submitter: 194.88.148.6
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php
Edit -- https://master.php.net/note/edit/95067
Del: integrated -- https://master.php.net/note/delete/95067/integrated
Del: useless -- https://master.php.net/note/delete/95067/useless
Del: bad code -- https://master.php.net/note/delete/95067/bad+code
Del: spam -- https://master.php.net/note/delete/95067/spam
Del: non-english -- https://master.php.net/note/delete/95067/non-english
Del: in docs -- https://master.php.net/note/delete/95067/in+docs
Del: other reasons-- https://master.php.net/note/delete/95067
Reject -- https://master.php.net/note/reject/95067
Search -- https://master.php.net/manage/user-notes.php