PHP 5.3 and your web application

bsoremsugar —  August 18, 2009 — 7 Comments

PHP LogoIt’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.
  • Closures are a feature that is popular in many functional languages as well as in Javascript, and allow you to define “throw-away” functions that are bound to a variable. The flexibility with this feature means you can pass functions as arguments to functions, defining these functions without having to worry about them needing to be in the global scope as well ( and in the process “throw” them away when they are no longer needed ).
  • 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.

7 responses to PHP 5.3 and your web application

  1. 

    Hi,

    we converted our Joomla based extension JoomFish to PHP 5.3 which was only a bigger deal as we needed to change a library which is outdated and not any longer supported. But other than that it worked easily.

    I know the next version of Joomla is also supporting PHP 5.3 in the next release (1.5.15) which was from what I saw also primarily a discussion about replacing libraries and other code that is no longer supported.

    Alex

  2. 

    Hi,

    we converted our Joomla based extension JoomFish to PHP 5.3 which was only a bigger deal as we needed to change a library which is outdated and not any longer supported. But other than that it worked easily.

    I know the next version of Joomla is also supporting PHP 5.3 in the next release (1.5.15) which was from what I saw also primarily a discussion about replacing libraries and other code that is no longer supported.

    Alex

  3. 

    PS: Is there a way to help you with testing Sugar 5.5 on PHP 5.3? Some switch to allow the installer to run through on this version too?

  4. 

    PS: Is there a way to help you with testing Sugar 5.5 on PHP 5.3? Some switch to allow the installer to run through on this version too?

  5. 

    I still have a Sugar ver 1.5 running can I upgrade to PHP to 5.3.20 with this version?

    Many thanks

    Nick

Trackbacks and Pingbacks:

  1. SugarCRM Developer Blog » Blog Archive » Sugar On Demand – PHP 5.3 across the board! - May 30, 2013

    […] is all in addition to the numerous language enhancements we’ve discussed before. And add to the fact the numerous security issues that PHP 5.2 has with it that aren’t going […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s