PHP 5.3 has been out since June 29th 2009 and while buggy at the time has started to mature to be a much more stable PHP version. As a result users have been asking us when are we going to support it and the answer has always been incompatibilities are holding us back. Unfortunately a lot of popular PHP scripts still do not work properly with PHP 5.3. Then if it’s not the PHP scripts it’s modules we use or add-ons not working properly or providing problems. A great example of that is Zend Optimizer which requires I believe you to re-encode for PHP 5.3. It also is not considered stable either last I checked and isn’t even available to download although if you use Zend Server you do have early access to it.
This is all going to change for us within the next weeks we are hoping. We had laid out plans to finally get the support in place. Due to all the incompatibilities this meant running PHP 5.3 alongside PHP 5.2 on our servers. With configuration changes in various parts it would require separate php configuration files, extensions etc. So it was not just a matter of a quick compile and we’re supporting it. We needed to plan out where everything was going to go to make PHP 5.3 work properly rather than be a big mess. That planning is over thankfully and we have successfully deployed it on our test machine and it works properly for the most part. The catch being right now Litespeed does not have suexec support for our desired extension of .php53 which is going to hopefully be changed soon.
So what is our time line for actual support? We’re hoping a week or so for testing with suexec support. Then another week to plan out our deployment plan as we need to deploy this across a lot of machines. Then finally we start deploying it on servers which most likely would mean going from newer machines and then further back to our older servers. It’s just smarter this way to gradually test in production environment rather than just deploy it on everything all at once. So based on all this I’m pretty confident that by the end of October it’ll be on all our servers unless we run into some problems along the way on the software end of things.
Now how will you enable PHP 5.3 I imagine is what the few brave who wish to run 5.3 are wondering. Well what will most likely happen is if you wish to run PHP 5.3 without modifying your .htaccess you’ll need to do .php53 file extensions. That’s not very friendly though so the more ideal solution would be to add the following to your .htaccess file:
AddType application/x-httpd-php53 .php
This would then allow you to run PHP 5.3 as .php files just by a simple .htaccess file modification.
This is not all set in stone as of yet but I’m pretty confident this is what it’ll end up being as it makes sense.
Now why should everyone be running PHP 5.3 well here’s the original 5.3.0 major changes:
- Support for namespaces
- Late static binding
- Lambda Functions and Closures
- Syntax additions: NOWDOC, ternary short cut “?:” and jump label (limited goto), __callStatic()
- Under the hood performance improvements
- Optional garbage collection for cyclic references
- Optional mysqlnd PHP native replacement for libmysql
- Improved Windows support including VC9 and experimental X64 binaries as well as portability to other supported platforms
- More consistent float rounding
- Deprecation notices are now handled via E_DEPRECATED (part of E_ALL) instead of the E_STRICT error level
- Several enhancements to enable more flexibility in php.ini (and ini parsing in general)
- New bundled extensions: ext/phar, ext/intl, ext/fileinfo, ext/sqlite3, ext/enchant
- Over 140 bug fixes and improvements to PHP, in particular to: ext/openssl, ext/spl and ext/date
This release also drops several extensions and unifies the usage of internal APIs. Users should be aware of the following known backwards compatibility breaks:
- Parameter parsing API unification will cause some functions to behave more or less strict when it comes to type juggling
- Removed the following extensions: ext/mhash (see ext/hash), ext/msql, ext/pspell (see ext/enchant), ext/sybase (see ext/sybase_ct)
- Moved the following extensions to PECL: ext/ming, ext/fbsql, ext/ncurses, ext/fdf
- Removed zend.ze1_compatibility_mode
So not bad lots of great features and improvements. Hopefully we meet our goal and by late October all our servers support PHP 5.3 as the optional PHP version. So if you’re a developer you’ll be able to tinker with it on our machines. If you’re running PHP scripts that require PHP 5.3 no worries just a quick modification to your .htaccess and you’re on your way.
The company I work for has been using PHP 5.3 for over a year now and we’ve found it quite stable. It’s extremely sad to see that some (major) products have not become compatible with this PHP version yet. It only emphasizes their unwillingness or incapability to adopt to changes made to the programming language they work with. What’s worse, some products that are paid for, like SugarCRM, haven’t adopted PHP 5.3 until some months ago.
It’s a good thing you are going to support it, since it’s long overdue, and it’s not your fault.
You’ve nailed it – it’s actually quite frustrating since we use PHP 5.3 internally and have for awhile but the fact remains if we switched our primary PHP version over a large portion of customer scripts would either flat out break or have unexpected behavior.
Being a bit “geekish” person, I, too, prefer mostly the latest, greatest and cutting edge versions of software 🙂
I’m a HH customer for over a year now (but not with the project I used as “my website”) and currently I depend too much on stability of 3rd-party scripts like Drupal, phpBB, WordPress, etc.
So, what for those who don’t need the 5.3 yet?
If I change nothing, all the environment will stay the same – PHP 5.2, as usual?
For those who do not need PHP 5.3 they will continue to use PHP 5.2. PHP 5.3 will have to be enabled by users who wish to use it.