PHP is a server scripting language it stands for Hypertext Pre-processor. The PHP codes are executed on the server side whereas HTML codes are directly executed on the browser. it allows the creation of dynamic content to interact with databases.
This article will explain how to install and configure PHP7.2 on Ubuntu.
Install PHP 7.2 on Ubuntu
The steps below will show how to install PHP 7.2 on the Ubuntu operating system.
- Update the software repository.
$ sudo apt update
- To install PHP 7.2 on Ubuntu need to install the required dependencies that are needed for installation using an external repository.
$ sudo add-apt-repository ppa:ondrej/php
- After successfully updating the package repository Install PHP and its common packages using the below command.
$ sudo apt install php7.2 php7.2-common
- Check the PHP version using the below command.
$ php -v