note 70691 added to function.create-function
| From: | DanD at osu1 dot php dot net | Date: | Tue, 24 Oct 2006 02:22:04 +0000 |
| Subject: | note 70691 added to function.create-function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119054@lists.php.net to get a copy of this message | ||
Beware when using anonymous functions in PHP as you would in languages like Python, Ruby, Lisp or
Javascript. As was stated previously, the allocated memory is never released; they are not objects
in PHP -- they are just dynamically named global functions -- so they don't have scope and are
not subject to garbage collection.
So, if you're developing anything remotely reusable (OO or otherwise), I would avoid them like
the plague. They're slow, inefficient and there's no telling if your implementation will
end up in a large loop. Mine ended up in an iteration over ~1 million records and quickly exhasted
my 500MB-per-process limit.
----
Server IP: 64.71.164.2
Probable Submitter: 64.81.244.251
----
Manual Page -- http://www.php.net/manual/en/function.create-function.php
Edit -- https://master.php.net/note/edit/70691
Del: integrated -- https://master.php.net/note/delete/70691/integrated
Del: useless -- https://master.php.net/note/delete/70691/useless
Del: bad code -- https://master.php.net/note/delete/70691/bad+code
Del: spam -- https://master.php.net/note/delete/70691/spam
Del: non-english -- https://master.php.net/note/delete/70691/non-english
Del: in docs -- https://master.php.net/note/delete/70691/in+docs
Del: other reasons-- https://master.php.net/note/delete/70691
Reject -- https://master.php.net/note/reject/70691
Search -- https://master.php.net/manage/user-notes.php