In this article, I will take you through the steps to install php on Ubuntu 18.04. PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
Install PHP on Ubuntu
Apache webserver should have already be installed.
Update the System
First you need to update your system using sudo apt-get update command.
Now you need to install php through sudo apt-get install php command.
Check PHP Version
Once the installation is completed, Check PHP version using php --version command.
Write your First PHP Program
Congratulations PHP is now successfully installed. Let's write our first php code and run it using php example.php command.
Also Read: How to install PHP on RedHat/CentOS 7
Reference: PHP Documentation