I've noticed that some people are still using PHP 4, are there any advantages to this?
From my experience, all the scripts that worked using PHP 4, worked great on PHP 5. So therefore I've just been using that even though it's not an explicit requirement for most of my scripts. But perhaps there is an advantage in the previous version that I'm not aware of..
There are several differences, both in configuration, and the way certain functions and expressions are handled. PHP 4 has a larger installed base at this point, but since PHP is server side, this is generally not going to effect the end user. If you have PHP 4 already, there is not much reason to upgrade to PHP 5, but if you are not already using PHP, and are asking which one to go with, I would suggest PHP 5.
Andy is right. There are several differences between both the versions of PHP but if you are using PHP 4 then it is not that necessary to upgrade to PHP 5. I would like to add that when someone uses one version for a longer time, one gets used to it and understands almost everything about it. Also, when someone uses the same version for a longer time he gets comfortable with it as he gets an idea about the technical aspects of it and does not want to upgrade. This might be the case with the people who are using PHP 4 and do not upgrade to PHP 5.
Andy is right. There are several differences between both the versions of PHP but if you are using PHP 4 then it is not that necessary to upgrade to PHP 5. I would like to add that when someone uses one version for a longer time, one gets used to it and understands almost everything about it. Also, when someone uses the same version for a longer time he gets comfortable with it as he gets an idea about the technical aspects of it and does not want to upgrade. This might be the case with the people who are using PHP 4 and do not upgrade to PHP 5.
True - there can be a lot of work involved in porting code from php4 to php 5 - I have done this once. It is mostly the same, but certain 'features' (bugs) in php 4 that get used to make cool things happen just don't work in php 5, so you have to find a work around. it was after this porting that I started writing everything in a more object orientated way - lots of little files containing functions that I referenced from the main code. That way I only have to change one function and all my code is fixed everywhere that function exists and I don't have to go searching through lots of files for lots of instances of a line of code that is broken. it just means that you get a lot of includes and pass a lot of variables about but overall it makes for easier maintainability. Kinda.