PHP Development Environment
Learn how to set up a local environment for PHP development.
We'll cover the following
In this appendix, we’ll discuss the tools that we need to run PHP projects on our local machines.
In short, we’ll discuss:
- The LAMP stack that we can use.
- The editor.
- The version control.
- The browser.
The LAMP stack
There are two main ways to set up an “AMP” stack on your computer:
- We can install each component separately. This approach is loved by many folks in GNU/Linux.
- We can also use a ready-to-use bundle or package. This approach is preferred by folks who use Windows or Mac.
Let’s see some examples of the most used “AMP-like” software bundles:
- XAMPP, which is available on all major OSs
- WAMPServer or Laragon, which is available only on Windows
- MAMP, which is available on Windows and Mac OSs
Note: We should also consider using the Docker solution.
Before we continue, let’s ensure that we can successfully run the following code snippet:
<p>Hello, world! The date of today is <?php echo date("d-m-Y"); ?>.</p>
We’ll create an index.php
file and put the code given above inside it.
We can also test our integrated environment by clicking the “Run” button below:
Get hands-on with 1400+ tech skills courses.