note 82241 deleted from language.constants.predefined by danbrown

From: Date: Wed, 25 Jun 2008 15:58:54 +0000
Subject: note 82241 deleted from language.constants.predefined by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140808@lists.php.net to get a copy of this message
Note Submitter: Ivan Zahariev ---- It seems that the Magic constants do NOT work in an eval()'ed code. Probably because PHP substitutes these statically when it compiles the source code of your PHP script initially. So the following will not work as expected: <?php function user_func1() { echo "User function name: ".__FUNCTION__."\n"; eval('echo "in eval(): User function name: ".__FUNCTION__."\n";'); } ?> Calling user_func1() will output: User function name: user_func1 User function name:

« previous php.notes (#140808) next »