|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-07-08 15:42 UTC] nn at rtfm dot cz
Description:
------------
I think that this is a bug, see the code, it is self-explaining :-)
Reproduce code:
---------------
function xx ($type = '_POST') {
echo '<pre>'; print_r($$type); echo '</pre>';
}
xx();
Expected result:
----------------
I expect to see my $_POST variables! :-)
Actual result:
--------------
Notice: Undefined variable: _POST in /www/album.cz/www/album/registrace/index.php on line 31
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 08:00:02 2025 UTC |
workaround - this way it works, but.. function foo($type='_GET') { global $$type; // note this print_r($$type); } looks like a "superglobal access" problem?