ID: 14952
Updated by: jan
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 4.1.1
New Comment:

the $_* arrays are intended to be seperate from ther $HTTP_*_VARS
arrays.
The new arrays are so called "super-global". You don't hve to introduce
them nito function-scope with global. This is a feature no bug => Bogus


Previous Comments:
------------------------------------------------------------------------

[2002-01-09 12:38:13] [EMAIL PROTECTED]

blah.php
<?php

        print_r( $HTTP_GET_VARS );
        print_r( $_GET );

        echo "<hr>";
        $_GET['test'] = 1;
        echo "<hr>";

        print_r( $HTTP_GET_VARS );
        print_r( $_GET );

?>

Results from blah.php
---------------------
Array ( ) Array ( ) 
Array ( ) Array ( [test] => 1 )

Results from blah.php?test=test
---------------------
Array ( [test] => test ) Array ( [test] => test ) 
Array ( [test] => test ) Array ( [test] => 1 ) 


Aside from the performance/memory implications of having two separate
arrays (ie: http://blah.com/blah.php?text=[shakespeare]&spell_check=1),
it's really annoying when trying to propagate information to a
moduralized script which normally takes data off the get-string.

Here is my patch:  $_GET =& $HTTP_GET_VARS;   It halves the memory
requirements of PHP's default arrays, and behaves much closer to what an
end-user would expect.  I am willing to bet that NOBODY wants
$_GET['blah'] = 'test'; echo $HTTP_GET_VARS['blah']; to fail in
mysterious ways.

Why is this not done in the first place?  I have checked on the mailing
lists and in the bug archives, but couldn't find any previous
discussion.  Send me an email at [EMAIL PROTECTED] if there is a good
reason for this, or if I am missing something important.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14952&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to