PHP7 is Finally Here!
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
- 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.
- 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:
- PHP 7.0.0 is already available at Kualo