A tutorial to get started with PHP installation on the local machine. In this tutorial, we will not explain all the details about installing PHP in different environments; instead, it will give an idea about how to get started quickly using the latest version of PHP.
To run a PHP application, a developer should have a web host installed in the machine along with PHP installation. Other installations may depend based on the requirements. Usually, developers prefer the MySql database along with the PHP application.
Manual Installation of Web server and PHP
Suppose you prefer to set up PHP using manually installing everything. In that case, the best way is to set up apache, PHP, and MySQL installation depending on the system you use for development purposes. Here is the complete installation tutorial for PHP installation and server set up https://www.php.net/manual/en/install.php.
PHP Setup Using Bundled Applications
There are some easy ways to install PHP in a local machine.
XAMPP
XAMPP from https://www.apachefriends.org/ is one of the easiest ways to install PHP locally or on a server. Xampp provides packages for Windows, Linux, and Mac OS. Which makes it easy for developers to set up a local development environment easily.
MAMP
https://www.mamp.info/ s another company that provides readymade applications for PHP development. Mamp has got support for Windows and MAC OS. Mamp pro is a widely used software for PHP development and supports multi PHP versions for different projects. It also got options to set up virtual hosts directly from the mamp.