Tuesday, December 9, 2014

List of Noticeable Features of PHP 5.6

There are many new features in PHP 5.6 but among all of them, here i would like to describe some important and noticeable features of PHP 5.6. There will be very useful for any PHP Developer. Let's take a glimpse of those.

Noticeable Features of PHP 5.6

1. Internal Operator Overloading :-

Internal operating overloading applies to only internal classes, in order to make development in that particular is easier and code cleaner to read. Click Here to get detailed explanation about it.

2. Uploads of over 2GB are now accepted :-

Until 5.6 version of PHP, There is on support to upload 2 GB in PHP. However, The uploads of arbitrary size are now easily supported.

3. POST data memory usage decreased :-

The usage of POST data memory has been shrunk by 2 to 3 times, following two removals: the always_populate_raw_post_data setting from php.ini, and the super global variable $HTTP_RAW_POST_DATA. So, you can no longer access raw post data that way, but need to rely on a solution, likewise:

$postdata = file_get_contents("php://input");

Note that getting POST via ://input is unavailable when a form is multi part.

4. Constant Scalar Expressions :-

This RFC can have expressions in places that only expect static values. It means. You can have basic arithmetic and logical structures in continuous declarations, class properties, function arguments and many more.

For example,  

const a = 1;
const b = a?2:100;

Now, this is no longer the case.

One might argue whether a constant really is constant if it depends on the value of another constant, but such meta discussions are better left for other times.

5. Zip improved :-

As we know that, Zip library got many improvements, particularly in the form of latest methods. Especially, one that stands out is ZipArchive::setPassword($password) which allows you to easily create password-protected zip files.

6. PHPDBG bundled by default :-

The gdb-like debugger, phpdbg, is now bundled by default as SAPI. It is used from the command line, to specify a break point, simplistic Java UI, altering programs at runtime.  Click Here to learn more about PHPDBG.

0 comments:

Post a Comment