note 51881 added to function.create-function

From: Date: Wed, 13 Apr 2005 18:51:21 +0000
Subject: note 51881 added to function.create-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-87973@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.create-function.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51881 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51881&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51881&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51881&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51881&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51881&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51881&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87973) next »