p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: - [pro_php] - while on the subject...core changes to the language


Message #1 by "Lawrence" <lkrubner@g...> on Sat, 23 Feb 2002 17:41:14 -0500
>From: Nikolai Devereaux [mailto:nikolai@u...]>

>The php changelog says that the new variables _GET, _POST, _COOKIE, _SERVER,

>and _ENV deprecate the old HTTP_xxx_VARS arrays.  This is yet another way

>that some little changes in the core language might have a deep impact on

>scripts in the future.



Does this mean that all the older scripts will suddenly stop working? This seems reckless to me,

reckless on the part of the PHP team. If my hosting provider upgrades a lot of the software I've

written will suddenly stop working.



Is there a future safe way to write a script? Right now my hosting provider is running 4.0.5 . How

do I write a script that's safe if my hosting provider upgrades? What about, for instance, $PHP_SELF

?



--lawrence krubner







Message #2 by "Nikolai Devereaux" <yomama@u...> on Sun, 24 Feb 2002 18:41:12 -0800



No, the HTTP_xxx_VARS still work, the new _xxx vars were introduced as a

convenience.  What I mean is that there will be a lot of code that won't be

portable to systems running older versions of PHP, but that's just the

nature of upgrades.



The fact that the changelog specifies that the old variables are deprecated

doesn't mean that they won't work.  It just means that they've introduced a

new way of accesing server variables that is "preferred" over the old way,

so we should stop using them if we upgrade to a newer version of PHP.





Take care,



Nik





> -----Original Message-----

> From: Lawrence [mailto:lkrubner@g...]

> Sent: Saturday, February 23, 2002 2:41 PM

> To: beginning php

> Subject: [beginning_php] - [pro_php] - while on the subject...core

> changes to the language

>

>

> >From: Nikolai Devereaux [mailto:nikolai@u...]>

> >The php changelog says that the new variables _GET, _POST,

> _COOKIE, _SERVER,

> >and _ENV deprecate the old HTTP_xxx_VARS arrays.  This is yet another way

> >that some little changes in the core language might have a deep impact on

> >scripts in the future.

>

> Does this mean that all the older scripts will suddenly stop

> working? This seems reckless to me,

> reckless on the part of the PHP team. If my hosting provider

> upgrades a lot of the software I've

> written will suddenly stop working.

>

> Is there a future safe way to write a script? Right now my

> hosting provider is running 4.0.5 . How

> do I write a script that's safe if my hosting provider upgrades?

> What about, for instance, $PHP_SELF

> ?

>

> --lawrence krubner

>

>

>

>




> $subst('Email.Unsub').




  Return to Index