note 83336 added to function.eval
| From: | thiago dot pojda at gmail dot com | Date: | Wed, 21 May 2008 13:15:51 +0000 |
| Subject: | note 83336 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139581@lists.php.net to get a copy of this message | ||
Correcting previous comment from Ivan Zahariev, PHP did not recognize __FUNCTION__ in his example
because of simple quotes (').
This code...
<?php
function user_func1() {
echo "User function name: ".__FUNCTION__."\n";
eval("echo \"in eval(): User function name:
".__FUNCTION__."\n\";");
}
user_func1();
?>
... outputs:
User function name: user_func1
in eval(): User function name: user_func1
----
Server IP: 216.92.131.65
Probable Submitter: 200.195.173.100
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- https://master.php.net/note/edit/83336
Del: integrated -- https://master.php.net/note/delete/83336/integrated
Del: useless -- https://master.php.net/note/delete/83336/useless
Del: bad code -- https://master.php.net/note/delete/83336/bad+code
Del: spam -- https://master.php.net/note/delete/83336/spam
Del: non-english -- https://master.php.net/note/delete/83336/non-english
Del: in docs -- https://master.php.net/note/delete/83336/in+docs
Del: other reasons-- https://master.php.net/note/delete/83336
Reject -- https://master.php.net/note/reject/83336
Search -- https://master.php.net/manage/user-notes.php