PHP-Using Old Code With New Versions

Because of its flexibility and compatibility with all major operating systems and wide web support, use of PHP coding is a handy and versatile tool in server-side programming. As the popularity of PHP programming increases there is a lot of reusable code available on the internet. PHP developers have worked to make sure that new versions of PHP can be used seamlessly with older code. There are only 2 significant developments that can affect the way you see the code in newer versions of PHP. 

Basically, any code written after 4.1.0 should work with only a few modifications. There were 8 new suoerglobal arrays introduced in this version, as well as much longer arrays in versions put out before that which are still in use. The newer versions after 5.0.0 have a directive which allows you to disable the longer predefined variables, the register_long_arrays directive. 

In PHP versions 4.2.0 and later, the default value for the directive register_globals is off. Programmers used to the old default value may make coding errors in the assumption that the default is on. It is preferable in newer programs to access this by using the directive $id in the URL. The directive $_GET[id]. will, however, still work regardless of what the default setting is.

One last note that although some same coding exists in HTML and PHP, it is not identical and modifying PHP code will not change anything. Your HTML coding will still function as it should regardless of modifications to PHP coding.