note 59394 added to function.eval
| From: | ChristineKorza at osu1 dot php dot net | Date: | Mon, 05 Dec 2005 20:32:51 +0000 |
| Subject: | note 59394 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99605@lists.php.net to get a copy of this message | ||
PLEASE don't use eval for simple variable creation! It's so much easier to use variable
variables like so:
<?php
foreach($_REQUEST as $key => $val)
{
${$key} = $val;
}
?>
Check out: http://www.php.net/manual/en/language.variables.variable.php
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59394
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59394&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59394&report=yes
Search -- http://master.php.net/manage/user-notes.php