note 110669 added to language.variables.superglobals
| From: | benjamin dot delespierre at gmail dot com | Date: | Wed, 21 Nov 2012 13:06:08 +0000 |
| Subject: | note 110669 added to language.variables.superglobals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192053@lists.php.net to get a copy of this message | ||
Just to illustrate the last note:
<?php
$type = "GET";
var_dump( ${"_$type"} ); // Works as we are in root scope
function foo ($type) {
return ${"_$type"};
}
var_dump( foo($type) ); // doesn't works
class foo {
public static function bar ($type) {
return ${"_$type"};
}
}
var_dump( foo::bar($type) ); // doesn't works either
?>
----
Server IP: 69.147.83.199
Probable Submitter: 80.94.101.83
----
Manual Page -- http://www.php.net/manual/en/language.variables.superglobals.php
Edit -- https://master.php.net/note/edit/110669
Del: integrated -- https://master.php.net/note/delete/110669/integrated
Del: useless -- https://master.php.net/note/delete/110669/useless
Del: bad code -- https://master.php.net/note/delete/110669/bad+code
Del: spam -- https://master.php.net/note/delete/110669/spam
Del: non-english -- https://master.php.net/note/delete/110669/non-english
Del: in docs -- https://master.php.net/note/delete/110669/in+docs
Del: other reasons-- https://master.php.net/note/delete/110669
Reject -- https://master.php.net/note/reject/110669
Search -- https://master.php.net/manage/user-notes.php