PHP7 is Finally Here!

Written by Trifo
HelloPHP7s

On the 3rd of December 2015 the PHP development team announced the immediate availability of PHP 7.0.0.

The release marks the start of the new major PHP 7 series.


PHP 7.0.0 comes with a new version of the Zend Engine, many improvements and new features such as:
  • Improved performance
  • Significantly reduced memory usage
  • Abstract Syntax Tree
  • Consistent 64-bit support
  • Improved Exception hierarchy
  • Many fatal errors converted to Exceptions
  • Secure random number generator
  • Removed old and unsupported SAPIs and extensions
  • The null coalescing operator
  • Return and Scalar Type Declarations
  • Anonymous Classes
  • Zero cost asserts
6 things you should know about PHP7:
  • it is 2 times faster than PHP5.6
  • mysql_ is deprecated. This is something you should consider before upgrading. You will need to use the much better mysqli_ or PDO MySql
  • do not use the PHP close tags at the end of a file. It is not required by PHP and in fact the Zend Framework specifically forbids it. By omitting it at the end of the file you are making sure that no trailing whitespace can be added.
  • Anonymous classes - useful for simple one-off objects. With anonymous classes you can define a class and instantiate an object inline.
img_27121204072015
  • The space ship operator - returns 0 if both operands are equal, 1 if the left is greater, and -1 if the right is greater. It is also called a three-way comparison operator, and it already exists in other popular programming languages like Perl and Ruby:
spaceship-operator
If you have any questions regarding this deployment, please don’t hesitate to get in touch via our helpdesk!

Don't miss out!

Get our updates on web development, online marketing, customer support and (of course) web hosting!

About Kualo: Jo

About the Author

Trifo works in customer support at Kualo. He's a ninja at working with popular open source applications like WordPress, Joomla and Drupal to name a few. Fun fact, Trifo recently became a father!