note 83306 added to function.preg-replace-callback
| From: | nene at triin dot net | Date: | Tue, 20 May 2008 10:14:31 +0000 |
| Subject: | note 83306 added to function.preg-replace-callback | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139550@lists.php.net to get a copy of this message | ||
The first example is bad, because it creates function for every line it processes. When the file has
many lines, you could easily run out of memory. The code should be changed so, that
create_function() is used outside of loop.
----
Server IP: 212.47.220.13
Probable Submitter: 90.190.182.174
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php
Edit -- https://master.php.net/note/edit/83306
Del: integrated -- https://master.php.net/note/delete/83306/integrated
Del: useless -- https://master.php.net/note/delete/83306/useless
Del: bad code -- https://master.php.net/note/delete/83306/bad+code
Del: spam -- https://master.php.net/note/delete/83306/spam
Del: non-english -- https://master.php.net/note/delete/83306/non-english
Del: in docs -- https://master.php.net/note/delete/83306/in+docs
Del: other reasons-- https://master.php.net/note/delete/83306
Reject -- https://master.php.net/note/reject/83306
Search -- https://master.php.net/manage/user-notes.php