PHP 7 , the latest version of PHP was already released. It was released on December 3rd, 2015. PHP 7 comes with a number of new features, and the most amazing feature is speed. PHP 7 provides an incredible performance boost to your web applications.
Here is the benchmark of PHP 7. PHP 7 benchmark.
In this tutorial, you’ll learn how to install PHP 7 on Ubuntu.
How to Install PHP, MySql, Apache in Ubuntu
How to Install PHP 7 on Ubuntu
Let’s first update the package index and install PPA called ondrej/php .
1 2 |
sudo apt-get update sudo add-apt-repository ppa:ondrej/php |
Now, we have to update the package index.
1 |
sudo apt-get update |
Check all PHP7 packages available for installation.
1 |
apt-cache search php7 |
apt-cache is used to search software packages which are available and these packages are ready for installation on Debian or Ubuntu based systems.
Install, Uninstall, Update Package through apt-get package manager in Ubuntu
You will get following output –
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
php-uploadprogress - file upload progress tracking extension for PHP php-mongodb - MongoDB driver for PHP php7.0-common - documentation, examples and common module for PHP libapache2-mod-php7.0 - server-side, HTML-embedded scripting language (Apache 2 module) php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary) php7.0-cli - command-line interpreter for the PHP scripting language php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary) php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) libphp7.0-embed - HTML-embedded scripting language (Embedded SAPI library) php7.0-dev - Files for PHP7.0 module development php7.0-curl - CURL module for PHP php7.0-enchant - Enchant module for PHP php7.0-gd - GD module for PHP php7.0-gmp - GMP module for PHP php7.0-imap - IMAP module for PHP php7.0-interbase - Interbase module for PHP php7.0-intl - Internationalisation module for PHP php7.0-ldap - LDAP module for PHP php7.0-mcrypt - libmcrypt module for PHP php7.0-readline - readline module for PHP php7.0-odbc - ODBC module for PHP php7.0-pgsql - PostgreSQL module for PHP php7.0-pspell - pspell module for PHP php7.0-recode - recode module for PHP php7.0-snmp - SNMP module for PHP php7.0-tidy - tidy module for PHP php7.0-xmlrpc - XMLRPC-EPI module for PHP php7.0-xsl - XSL module for PHP (dummy) php7.0 - server-side, HTML-embedded scripting language (metapackage) php7.0-json - JSON module for PHP php-all-dev - package depending on all supported PHP development packages php7.0-sybase - Sybase module for PHP php7.0-sqlite3 - SQLite3 module for PHP php7.0-mysql - MySQL module for PHP php7.0-opcache - Zend OpCache module for PHP php-apcu - APC User Cache for PHP php-xdebug - Xdebug Module for PHP php-imagick - Provides a wrapper to the ImageMagick library php-redis - PHP extension for interfacing with Redis php-memcached - memcached extension module for PHP, uses libmemcached php-apcu-bc - APCu Backwards Compatibility Module php7.0-bz2 - bzip2 module for PHP php-rrd - PHP bindings to rrd tool system php-memcache - memcache extension module for PHP php-zmq - ZeroMQ messaging bindings for PHP php-igbinary - igbinary PHP serializer php-msgpack - PHP extension for interfacing with MessagePack php7.0-bcmath - Bcmath module for PHP php7.0-mbstring - MBSTRING module for PHP php7.0-soap - SOAP module for PHP php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php7.0-zip - Zip module for PHP php-tideways - Tideways PHP Profiler Extension php-mailparse - Email message manipulation for PHP php-propro - propro module for PHP php-raphf - raphf module for PHP php7.0-dba - DBA module for PHP libapache2-mod-php7.1 - server-side, HTML-embedded scripting language (Apache 2 module) libphp7.1-embed - HTML-embedded scripting language (Embedded SAPI library) php7.1-cgi - server-side, HTML-embedded scripting language (CGI binary) php7.1-cli - command-line interpreter for the PHP scripting language php7.1-dev - Files for PHP7.1 module development php7.1-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) php7.1-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary) php7.1-bcmath - Bcmath module for PHP php7.1-bz2 - bzip2 module for PHP php7.1-common - documentation, examples and common module for PHP php7.1-curl - CURL module for PHP php7.1-dba - DBA module for PHP php7.1-enchant - Enchant module for PHP php7.1-gd - GD module for PHP php7.1-gmp - GMP module for PHP php7.1-imap - IMAP module for PHP php7.1-interbase - Interbase module for PHP php7.1-intl - Internationalisation module for PHP php7.1-json - JSON module for PHP php7.1-ldap - LDAP module for PHP php7.1-mbstring - MBSTRING module for PHP php7.1-mcrypt - libmcrypt module for PHP php7.1-mysql - MySQL module for PHP php7.1-odbc - ODBC module for PHP php7.1-pgsql - PostgreSQL module for PHP php7.1-pspell - pspell module for PHP php7.1-readline - readline module for PHP php7.1-recode - recode module for PHP php7.1-snmp - SNMP module for PHP php7.1-soap - SOAP module for PHP php7.1-sqlite3 - SQLite3 module for PHP php7.1-sybase - Sybase module for PHP php7.1-tidy - tidy module for PHP php7.1-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php7.1-xmlrpc - XMLRPC-EPI module for PHP php7.1-zip - Zip module for PHP php7.1-opcache - Zend OpCache module for PHP php7.1 - server-side, HTML-embedded scripting language (metapackage) php7.1-xsl - XSL module for PHP (dummy) |
All the PHP7 packages are added. Let’s install it.
1 |
sudo apt-get install php7.0 |
To verify whether php7.0 is installed or not, just type php -v command on your terminal.
1 |
php -v |
The following output will be printed.
1 2 3 4 |
PHP 7.0.8-2+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-2+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies |