What’s Going on PHP 7?

NEW! PHP 7 is Now Available

PHP enters its seventh edition and this one, is surely, one of the biggest updates to one of the most popular programming languages of the world. As per the statistics, PHP has been powering as many as 200 million websites across the globe, along with over 81.7 per cent public websites running PHP on the server side.

Best and Cheap PHP Hosting

With the new upgrade, PHP has taken a giant leap. PHP 7 is the first major updated version of the programming language since 2004. PHP version 5.0 was released then. This new version of PHP programming language brings in some major improvements and is about three times up in terms of the performance as compared to PHP 5.6.

The new update also brings in some smaller, yet significant changes including the return type declarations, reduced memory usage, the spaceship operator, et al.

PCO is the PDO for Cryptography

One thing that we already know is that there will be an abstraction extension named PCO that will be like PDO but for cryptography.

Asynchronous Programming with Async and Await

Another possibility is that PHP provides better built-in asynchronous programming support using the async and await constructs. These are keywords that allow you to run multiple parallel tasks in the same script, so you do not have to wait for one to perform another.

Do not confuse asynchronous programming with multi-threaded programming. This is something that PHP can already perform using the pthreads extension.

The greatest advantage of the async and await constructs is that you no longer have to deal with the callback hell. This means that if you need to wait for some asynchronous operation like accessing the file system, database or remote servers, you just use the await keyword so the script will continue to the next statement when the asynchronous operation is finished.

The async and await keywords require some non-trivial changes to PHP because it will need to deal with internal event loops. However, PHP core developers have already started discussing the possibility to implement the async and keyword constructs because they need to make those keywords reserved before other developers start using them.

Furthermore Facebook Hack language also supports async and await. I suspect that Facebook developers may help PHP core developers on bring async and await to PHP.

You may wonder if having these constructs in PHP is it really important. It is important once you learn their advantages.

Many developers have moved on to Node.js because of its support to asynchronous programming. Node.js does not yet support async and await keywords but it is just a matter of time because that is one of the features of EcmaScript 7 which will be the base of future JavaScript versions to be used by Node.js.

Developments like this may be considered even more important specially after the recent announcement of WordPress to move as much as possible to JavaScript, including Node.js and React framework on the server side.

Apparently this was a step they did to make more efficient use of their server based that hosts WordPress.com blogs. We don’t know yet if the WordPress community will embrace that project because there are thousands of plugins that rely on PHP.

Standalone Web Server

PHP already comes with a standalone Web server but it is not really recommended for production environments.

Once PHP comes with built-in asynchronous programming support, it will be easier to develop HTTP Web server written even in pure PHP just like you can do with Node.js.

This could make PHP more flexible in terms of features and more efficient in terms of handling parallel requests with less memory, especially when combining asynchronous programming with multi-threaded programming based on pthreads.

Are You Looking for CentOS Linux Dedicated Server?

You have many options when choosing a Reliable Dedicated CentOS Linux hosting company. Our recommendation for CentOS Linux Dedicated Server is ASPHostPortal.com. ASPHostPortal.com is the best and cheap CentOS Linux Dedicated Server.

Best and Cheap CentOS Linux Dedicated Server

With CentOS Linux dedicated server from ASPHostPortal.com, you have full root access to the server 24/7/365. The server is a dedicated service and it is not shared among their clients. All ASPHostPortal.com servers offer the most advanced CentOS Linux Dedicated Server operating system available today.

Rate this post