Created by Rasmus Lerdorf in 1994, PHP is a server-side scripting language and general-purpose programming language that’s used primary in web development. According to Netcraft, it’s used on more than 244 million websites spread across 2.1 million unique IP addresses, making it one of the most popular coding languages for websites. PHP7, the latest version, is currently underway, offering web designers and coders alike a plethora of new features.
New Zend Engine
PHP 7 will be powered by a brand spankin’ new Zend engine. The original Zend engine was introduced back in 1999 with the release of PHP 4. Zend II was released for PHP5, which offered several new improvements in terms of functionality and performance. PHP 7 will feature a new version of the Zend engine using an experimental branch of PHP called PHP Next Generation, or “PHP#NG.”
With the introduction of PHPNG comes numerous performance improvements, including optimized memory usage and the use of just-in-time compilation (JIT). So, what does all of this mean in terms of functionality? With PHP7, users can expect to see some faster code executions – up to twice as fast according to some benchmarks.
Check out this presentation on PHP.net, for instance. PHP7 handled twice as many requests on the content management system (CMS) WordPress when compared to its PHP 5.6 predecessor. Theoretically, that represents a 2x improvement in speed.
It’s been a long time in the making, but PHP is finally receiving return types. PHP 7 will allow users to specify return types on functions; thereby, enhancing the current parameter type declarations while offering support for integer, float, string and boolean declarations. Users have been asking for return types for years now, but PHP engineers have been reluctant to add it. But return types are now here, thanks to PHP7.
64-Bit OS Support
Ever since the early days of its inception, PHP has used Linux as its native operating environment. So when Microsoft began releasing 64-bit operating systems, some Windows users complained of errors. PHP7 will continue to use Linux, but the new generation will now offer consistent 64-bit support. This means you can continue to run PHP7 on your 64-bit Windows OS without fear of encountering compatibility problems.
Among the most notable features of PHP7 is the addition of two new operators: the spaceship and Null Coalesce. The spaceship operator lives up to its namesake by looking like a spaceship: <=>. It returns 0 when both operands are equal. It will return 1 if left is greater than the right, or -1 if the right is greater than the left.
The Null Coalesce operator is nothing more than two question marks (e.g.: ??), and is used to check if a specific element exists.
GET YOUR FREE PHP EBOOK!