As we know PHP is a leading scripting language in now a days and it has make theeffects on popular languages like java and .net for web application development fields and grwoing day by day and most of the young human tends towards it so it is very necesssary to know how replaced the old code with new one. The PHP developers have largely tried to preserve backwards compatibility, so a script written for an older version will run (ideally) without changes in a newer version of PHP. In practice, some changes will usually be needed.

Two of the most important recent changes that affect old code are:

* The deprecation of the old $HTTP_*_VARS arrays (which need to be indicated as global when used inside a function or method). The following superglobal arrays were introduced in PHP » 4.1.0. They are: $_GET, $_POST, $_COOKIE, $_SERVER, $_FILES, $_ENV, $_REQUEST, and $_SESSION. The older $HTTP_*_VARS arrays, such as $HTTP_POST_VARS, also exist. As of PHP 5.0.0, the long PHP predefined variable arrays may be disabled with the register_long_arrays directive.
* External variables are no longer registered in the global scope by default. In other words, as of PHP » 4.2.0 the PHP directive register_globals is off by default in php.ini. The preferred method of accessing these values is via the superglobal arrays mentioned above. Older scripts, books, and tutorials may rely on this directive being on. If it were on, for example, one could use $id from the URL http://www.example.com/foo.php?id=42. Whether on or off, $_GET['id'] is available.

For more details on these changes, see the section on predefined variables and links therein.


 

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Regular SEO Monitori

If we are doing SEO for any websist so their ...

Important Blog Redes

SEO is a essential technology for all business owners those ...

Some Trens shaping F

Mobility is leading phase of present technology and its growing ...

Youtube Marketing St

YouTube аѕ wе аƖƖ know іѕ one οf thе hottest ...

Best Backup Utility

              Backup is a very important aspect of every business mainly ...

Five open source tec

IDG News Service published a News that in comming years ...

Using old code with

As we know PHP is a leading scripting language in ...

PHP Mail Function Tu

                PHP provide you a handy and convenient way to send ...

How to use arrays in

                You know very well that an array is a variable ...

Create Image Slidesh

Here is a small tutorial to show you how we ...