PHP 7 Released
PHP 7 Released
Written by Kay Ewbank   
Friday, 04 December 2015

PHP 7 has been released and is generally available. The new version uses a different engine to achieve better performance, and has an upgraded core interpreter. 

 

phplogo

PHP's migration from a simple scripting language designed to build web pages programatically to a very general server side web language means it serves eight out of ten websites using server-side code.

The new release is based on Zend Engine, which is faster and uses less memory. According to PHP tools vendor Zend Technologies, which led the PHP Next-Gen project on which PHP 7 is based, the performance improvements of PHP 7.0 range between 50% and 200% on real-world apps without changing a line of code. PHP 7 also has consistent 64-bit support.Andi Gutmans, Zend's CEO, says that the new version also has reduced memory requirements, around two-thirds of the original requirements, which means you may get three times the throughput as PHP 5.6.

Syntactically, a null coalescing operator has been added along with a combined comparison operator. Support for return type and scalar type declarations has also been added along with support for anonymous classes.

The new combined comparison operator, <=>, is being referred to as the Spaceship Operator. It can be used for combined comparisons – mostly when dealing with sorting. It is similar to strcmp() or version_compare() in behavior, but it can be used on all generic PHP values with the same semantics as <, <=, ==, >=, >.

The support for return type declarations and scalar type hints means developers will be able to declare what kind of return type a function is expected to have in a similar way to argument Type Hints. Argument type hints and the new return-type declarations also now support new scalar types, so you can denote that you’re expecting strings, floats, ints or bools to be passed or returned.

The changes to the syntax mean some older code is likely to fail under the new version. A full list of incompatibilities can be found in the migration guide.

 

 

phplogo

More Information

PHP 7 Released

Download PHP 7

Related Articles

PHP 7 Beta Released

The Next Version Of PHP And The Status Of PHPng

PHP At 20

PHP Gets A Formal Specification 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter,subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin

Banner


Echo Spot Poised To Occupy Top Slot In Alexa Range
28/09/2017

The Echo Spot, which takes features from the Show and the Dot may well turn out to be the most popular in Amazon's latest lineup of new Alexa-powered devices. 



Facebook Re-licences React To MIT Licence
25/09/2017

Facebook has, very reasonably, given into pressure from all sides to change the licence of many of its open source project from the contentious BSD+patents to the more familiar and friendly MIT Licens [ ... ]


More News

 
 

 

blog comments powered by Disqus

Last Updated ( Friday, 04 December 2015 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.