homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Php 6.0

Msg#: 4421891 posted 8:38 am on Feb 26, 2012 (gmt 0)

I would assume this has already been addressed at some point, but I'm not certain how to/limit/what to search for.

When 6.0 is released, one of the primary changes I noticed was the removal of $HTTP_GET_VARS and the like.
When I come across these during maintenance, I change them to $_GET and its counterparts.

My question: is doing something like the following catchall, going to prevent an entire overhaul if I don't get a chance to update *every* instance before the 6.0 release?
$_GET = $HTTP_GET_VARS; (for example)



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4421891 posted 11:29 am on Feb 26, 2012 (gmt 0)

You should be doing it the other way around as the _GET superglobal is always populated with the passed url parameters while the HTTP_GET_VARS is the one about to be removed.
I used the reference op so a change on the one array will update both so you have them in sync.


Msg#: 4421891 posted 11:23 pm on Mar 13, 2012 (gmt 0)

Thanks for that!

brotherhood of LAN

WebmasterWorld Administrator brotherhood_of_lan us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4421891 posted 11:32 pm on Mar 13, 2012 (gmt 0)

That's a good workaround, from what I understand of PHP pointers, if you changed a value in _GET or HTTP_POST_VARS then you would be using twice as much memory to store the separate sets of values. Using the reference eliminates that extra overhead.


Msg#: 4421891 posted 11:47 pm on Mar 13, 2012 (gmt 0)

I'm not sure I follow. Are you saying the usage of $_GET['variable'] uses more memory than the old option of $_HTTP_GET_VARS['variable'] ?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved