Free Quote
Blog

Say hello to the new version of PHP! (Migrating to PHP 5.3)

We sure that some software specialists who develop PHP applications have already downloaded and started testing the new features of PHP 5.3. No doubt, this version can be considered as the major change in language over the past 7 years. But most of the developers are not interested in new features, which can be used for their future developments; first of all they worry about changes that can affect already written applications.

What was updated

Good news for PHP developers who used to write code according to the current trends, your application will be affected only by a few changes. But those programmers, whose code was aimed at earlier versions of this language, should be so lucky! :) So, in this post and the next one we are going to describe some key points that deserve your attention (we hope you will find some useful tips here, especially if you are going to migrate from PHP 5.2.x to PHP 5.3.x).

Of course this list of updated features is not a complete one, more extensive information you’ll find in PHP 5.3 changelog.

More work with arrays

Array functions in the previous PHP versions could work with arrays taking them as arguments, so you could indicate an array or an object as an argument. But you can’t do it in 5.3, many of array functions now can accept only arrays. If you want to get object properties using any of the options below, you will need to convert the object into array:

natsort ()
natcasesort ()
usort ()
uasort ()
uksort ()
array_flip ()
array_unique ()

To be continued…

Leave a Comment
Your email will not be published