PHP 5.4.6 or 5.3.16 for production?

Christophe asked:

On php.net, we can read : All users of PHP are encouraged to upgrade to PHP 5.4.6, or at least 5.3.16.
Does it mean that it is better to use 5.4.6 than 5.3.16, even for production ?
I have heard that 5.4.6 is not stable.

I would be interested in 5.4.6 in order to use http://php.net/manual/en/session.upload-progress.php, but will not if PHP 5.4.6 is not stable.

Thank you.

My answer:


For developing a new project from scratch, I would go with 5.4. It will have a much longer shelf life than 5.3 or prior versions.

For deploying an existing project, including any open source PHP code you downloaded from the Internet, I would use PHP 5.3. The reason for this is that 5.4 has a few places where backward compatibility was broken, and some existing PHP scripts will need updating to be compatible with 5.4. In a few cases, the package would have to be completely refactored to work with 5.4.

See the PHP 5.4 migration guide for all the gory details.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.