What's New in PHP 5.4
The latest version of PHP programming language, PHP 5.4, has been finally released. Though, looking at the timeframe, we should have been offered with PHP 6.0, but issues concerning Unicode caused the delay. But again, this version of PHP offers numerous features that were likely to be a part of PHP 6.0. So let’s take a look at some essential features and upgrades that have been introduced in this latest iteration of offshore PHP development.
1. Traits: Traits are quite useful as they reduce the limitations offered by single inheritance. At the core, traits are similar to abstract classes and can store any number of methods and properties. You can get more information about traits on PHP community’s official site.
2. Short Array Index: The array index has finally been shortened! Instead of using the old school array (~ ) construct, you have the freedom of using JavaScript like square brackets, which save you a lot of time and effort.
3. New Commands: A number of new commands have also been introduced which are likely to prove quite beneficial. Here’s a comprehensive listing of some of these commands:
http_response_code(int $code)
hextobin(string $hex)
trait_exists(string $name [,bool $autoload])
header_register_callback(string $function)
4. Built-In Web Server: PHP 5.4 comes with a brand new built-in server which can be run using Mac, Linux or Windows command line. It may not be IIS or Apache, but it does support simple testing. Hopefully, some better PHP IDE’s are implemented soon.
PHP 5.4 is available for download from the official PHP community website. The site also has a PHP 5.3 migration guide for people who wish to keep their old settings intact. If you are planning to launch a new online venture, you must take a close look at PHP 5.4. Also, hire offshore PHP developer who has knowledge of this PHP platform.