It’s been almost two months now since PHP 5.3 has come on the scene, bringing not only many performance and stability improvements to the language, but also several new features that bring new capabilities to the language. The list of features added includes:
- Namespaces are probably one of the most sought after and debated features in PHP history, this enables you to namespace your variables, functions, classes, and constants to avoid naming collisions of having everything defined in the global scope.
- Late Static Binding give you more options when subclassing static methods and properties, enabling developers to resolve class references at run-time rather than compile-time.
- Circular garbage collection which will help memory usage in many complex objects ( we at Sugar are really excited about this ).
- Better Windows support, including VC9 builds which offer better performance than the standard VC6 built binaries ( big benefits to anyone deploying on Windows here ).
- Inclusion of the phar extension, which allows you to package an entire application inside an single file similar to JAR files in Java ( something else we are looking at here at Sugar ).
So with all these new features, it seems like moving to PHP 5.3 is a no brainer. The PHP project provides guides related to backwards incompatible changes and deprecated features for those upgrading from PHP 5.2, which cover most of things users upgrading their codebases to work with PHP 5.3 should look for as part of the migration. Here at Sugar we’re beginning internal testing on PHP 5.3 for future versions of SugarCRM, in the process making adjustments to the product as needed to ensure smooth sailing under the new version of PHP.
How many other developers have converted their applications to support PHP 5.3? Has it been easy, or have you had difficulty in readying you code? Sound off in the comments with your experiences.