PHP 7 comes with a new version of the Zend Engine, numerous improvements and new features such as:
- Improved performance: PHP 7 is up to twice as fast as PHP 5.6
- 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
Today (12 April 2016), latest Ubuntu release doesn't include PHP 7. You can install PHP 7 from third-party repository such as PPA. PPAs are not bound by the release schedules or policies of Ubuntu so they are free to change versions more frequently, among other things. Ondrey PPA is a popular way of staying more up to date with PHP. Ondrey is the official owner of the PHP tree in Debian, which is upstream from Ubuntu.
To install PHP 7 in Ubuntu you can do the following:
1. Add PPA repository
$ sudo apt-get install python-software-properties
$ sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
2. Remove PHP 5 and install PHP 7
$ sudo apt-get update
$ sudo apt-get purge php5-common -y
$ sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
$ sudo apt-get --purge autoremove -y
Comments
Post a Comment