|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-23 21:17 UTC] sniper@php.net
[2002-08-04 19:56 UTC] mr dot nobody at nowhereville dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
<? $h= "_GET"; print_r($$h); echo "<hr>"; function g() { print_r($_GET); } g(); echo "<hr>"; function t() { $g= "_GET"; print_r($$g); } t(); echo "<hr>"; $h = "hi"; function b() { global $h; $g = "h"; print_r($$g); } b(); ?> I've reported a similiar bug earlier (but forgot to include something trivial in the test script and thought it was a larger one than it is... i was rebuffed, it was marked bogus, and nobody seems to pay attention to "bogus" bugs) In the function above: The first print_r works as expected, verifying that variable-variable referencing DOES work. The g() function works as expected, verifying that superglobals are available in function scope. The t() function seems to do NOTHING, this is where the bug seems to be. The b() function works as expected, verifying that it works with regular globals. -- This has been tested and observed on OpenBSD and linux, with PHP versions 4.2.1 and 4.2.2 Ted