Recently I have installed php 5.3 on a pc and just like many posts on this forum have been saying the latest version of php does not guarantee 100% backwards compatibility. Especially for some oop parameters where the symbol "&" needs to be used before the variable at specific points unlike php 5.2. Due to these changes recommends for people to upgrade to 5.3 although I wouldn't recommend it myself if you have an existing scripts. Also if you want cms's like mediawiki to work under 5.3 then some modifications to the core of the script will be necessary. Just thought I would point this out as it explains a few of the problems posted in this forum and hopefully this can be made a sticky. Any comments on the issue are welcome...

Recommended Answers

All 3 Replies

I wouldn't disregard it complete, though, out of fear of backwards incompatibility. Not before testing it.

If you are worried about compatibility with older code, setting up a test server on a development machine, or just on your own PC using VirtualBox (or something equivalent), isn't hard to do.

If you can deploy on 5.3 you really should. If only for the new mysqlnd driver. And there are a lot of other new features that you can take advantage of.

commented: Agree. +6

I wouldn't disregard it complete, though, out of fear of backwards incompatibility. Not before testing it.

As I mentioned in my first post, I have tested mediawiki and some scripts I made on php 5.2 - worked fine in the old version. Transfered it to php 5.3, errors popped up in the syntax in the core of mediawiki where I shouldn't need to edit but with php 5.3 you do due to the new syntax. So I have tested both versions and although basic apps will easily migrate - advanced oop apps especially along with a few other cms's will not migrate. Have tested this myself and you can give it a try.

Sure, I'm not doubting you. I was more aiming my reply at future readers.

Your recommendations against upgrading when you have existing code, may well cause people to be overly anxious about upgrading, and I just wanted to underline that there is no need to be so worried about backwards incompatibility that you rule it out before trying it.

There is usually the odd regression bug introduced when major upgrades are released, but it is easy to find out if those will affect your code by doing a bit of testing. And if your code is affected, it will usually only require a minor tweak to become compatible.

I would always recommend using the latest version of any software (especially open-source) if you can, even if it requires a bit of effort on your part.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.