If you are planning to upgrade to PHP 5.3 from PHP 5.2.x then you must think twice before you really do it. There are few things you should take care of. Recently last week I tried upgrading one of the web-server to PHP 5.3 from PHP 5.2.9 and it was not a good idea which I came to know later on.

It is not only about deprecated functions which are creating Warnings or Notices but TCPDF library for generating PDF has created some wired problems due to which I have to roll back to the older version, as it was one of the crucial functionality of the application. It was not a planned version upgrade but it was a server migration and on the fly I tried upgrading PHP version also.

There are many functions and some of php.ini parameters which are deprecated, for complete list please refer http://www.php.net/manual/de/migration53.deprecated.php.

You can’t pass parameter while overriding “magic methods”; so if you ever had your __toString() method overridden with __toString($device = ‘SCREEN’) then it won’t work with PHP5.3. Other than that date_default_timezone() or similar timezone setup function also had some problems.

// This won't work with PHP5.3 and will work with 5.x
public function __tostring($device = "SCREEN")
{ ... }

// This will work with PHP5.3 and 5.x
public function __tostring()
{ ... }

So crux is if your applications are not ready for PHP5.3 it is not wise decision to upgrade and if you have to upgrade we should make sure to test whole application and all functionalities as with large development teams sometimes you never know who has used what all the time.