note 92476 added to function.eval
| From: | grimm dot otzberg at freenet dot de | Date: | Sun, 26 Jul 2009 12:45:52 +0000 |
| Subject: | note 92476 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158736@lists.php.net to get a copy of this message | ||
When I enter
<?
$evalcode = "$number = $key";
$key = 17;
eval($evalcode);
echo $number;
?>
the result isn't 17. Is there any way to handle this problem? I've got the evalcode in an
array and the variables are defined later.
----
Server IP: 69.147.83.197
Probable Submitter: 87.167.65.152
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- https://master.php.net/note/edit/92476
Del: integrated -- https://master.php.net/note/delete/92476/integrated
Del: useless -- https://master.php.net/note/delete/92476/useless
Del: bad code -- https://master.php.net/note/delete/92476/bad+code
Del: spam -- https://master.php.net/note/delete/92476/spam
Del: non-english -- https://master.php.net/note/delete/92476/non-english
Del: in docs -- https://master.php.net/note/delete/92476/in+docs
Del: other reasons-- https://master.php.net/note/delete/92476
Reject -- https://master.php.net/note/reject/92476
Search -- https://master.php.net/manage/user-notes.php