ID: 26047 Updated by: [EMAIL PROTECTED] Reported By: dw-bugs dot php dot net at botanicus dot net Status: Wont fix Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.3.3 New Comment:
No. Previous Comments: ------------------------------------------------------------------------ [2003-10-31 05:01:47] dw-bugs dot php dot net at botanicus dot net Will this be fixed in Zend2? ------------------------------------------------------------------------ [2003-10-31 04:44:04] [EMAIL PROTECTED] Hi, This is by-design and it's the price you have to pay for these special superglobals. A price which is worth paying... If this is not documented in the online docs then feel free to drop a line to [EMAIL PROTECTED] with the wording you think should be added ------------------------------------------------------------------------ [2003-10-30 23:38:43] dw-bugs dot php dot net at botanicus dot net Description: ------------ >From the implementation I suppose this is pretty obvious, but the following does not work: $data_source = '_POST'; $data =& $$data_source; '$data' does not point at $_POST as expected. I'd consider this a problem - your implementation is showing through. Either re-label $_POST, etc. as not actually being superglobals, or fix the underlying implementation (which does not at present match up with your documentation). """This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script.""" This statement is not true, since the variable is only 'automatic global' when referred to by name directly (and thus gets caught by your special case code). It does not actually exist in every scope. I beg you not to mark this as a documentation problem and change the docs to mention this. Fix it! It's a horrible inconsistancy. This, along with a million other sour points, is the reason why I absolutely detest my day job at the minute. Come on guys! Do it for me! Reproduce code: --------------- $data_source = '_POST'; $data =& $$data_source; echo gettype($data); Expected result: ---------------- array Actual result: -------------- NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26047&edit=1