How to install PHP 7.2 on Ubuntu

Nikunj Kanetiya 2018-11-28


PHP 7.2 is out there, Here is the way to install PHP 7.2 on your Ubuntu 16.04 or later.

PHP 7.2 Beta 1 presents the Sodium extension for modern and easy-to-use cryptography, opcache improvements, better JSON decoding of invalid UTF-8 data, and many bug fixes among other improvements since PHP 7.1. The latest release and more details can be found via

Fire up the following bash commands to install PHP 7.2.


sudo apt-get install -y php7.2 php7.2-cli php7.2-dev \
php7.2-pgsql php7.2-sqlite3 php7.2-gd \
php7.2-curl php7.2-memcached \
php7.2-imap php7.2-mysql php7.2-mbstring \
php7.2-xml php7.2-zip php7.2-bcmath php7.2-soap \
php7.2-intl php7.2-readline



Created on : 2018-10-04
Written by

Nikunj Kanetiya

Full Stack Web Developer

PHP7.2 Instllation
Install php on ubuntu