Research & Documentation 03 Local Php
Local PHP - Technique 01 - Local Web Server
One way to run PHP locally is using a local web server. There are different local servers, so users can choose the one that best fits their needs. XAMPP is one of these tools, and was created by Apache. This platform can run on Windows, Linux and MacOS. In order to use this type of tool to run your PHP locally, you first need to download and install it. After doing this, the user needs to open the XAMPP control panel and start the Apache server to run PHP and MySQL. Then the user needs to save their PHP files in a folder and run PHP in a browser.
Source: geeksforgeeks - How to run PHP programs?
Local PHP - Technique 02 - PHP Built-in Web Server
Another way to run PHP locally, is using the PHP built-in web server. It is noted in the PHP website, that this feature is not supported on windows. In order to run PHP locally with this built in server, the user needs to start in the terminal. There is no need to install anything in order to use this feature, and there is no need to make any configurations, and would be good for uses like simple test processing tasks.
Source: PHP - Built-in web server
Source : Medium - Running PHP Locally
Local PHP - Technique 03
Docker is a platform that allows users to run PHP locally. In order to be able to use it, the users need to download Docker Desktop. This platform is very consistent and efficient. It is free for personal use, but they also have plans depending on the user’s needs. There are a couple of articles that guide you step by step on how to set up to be able to run PHP locally, as well as many resources to help users to accomplish it. Below are listed a couple of articles that help users understand and follow instructions in order to be able to use docker to run PHP locally.
Summary
In summary, there are several options for users to browse around and find the best option to run php locally. It all comes down to the user's needs. It is also important to note that users need to be informed about the choice they would make as some techniques require more work and understanding than others, some are free, and some come with a cost.
docker docs - Containerize a PHP application
DEV - Setup a basic Local PHP Development Environment in Docker - Containerize a PHP application