note 51881 deleted from function.create-function by betz
| From: | betz@php.net | Date: | Tue, 20 Sep 2005 08:56:10 +0000 |
| Subject: | note 51881 deleted from function.create-function by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95457@lists.php.net to get a copy of this message | ||
Note Submitter: evildictaitor at hotmail dot com
----
As a general rule, along with eval(), you should avoid using this function AT ALL COSTS, as it
requires PHP to load it's entire engine into runtime, instead of simply compiling to
pseudo-binary and executing.
In laymans terms, the overhead of using eval() or create_function() in one medium to large program
is about three times that of not using it.
The only reason I can see of using this function is for use with rename_function() or
override_function() for preventing access to a function (if auto-prepend is used) or for debug
purposes.
Why use create_function, when you can specify it as arguments anyways?
Basically, if create_function() is the answer, you arn't asking the right question.