Programming With PHP
This guide provides quick and easy instructions to set up PHP on Windows, Linux, and macOS.
Windows Installation
1. Download PHP
- Visit the official PHP download page.
- Download the latest Non Thread Safe zip file for Windows.
2. Install PHP
- Extract the zip file to
C:\php
. - Add
C:\php
to the system Path environment variable.
3. Verify Installation
- Open the Command Prompt.
- Type
php -v
to verify the installation.
Linux Installation
1. Install PHP
- Open the Terminal.
- Install PHP by running:
sudo apt update
sudo apt install php
2. Verify Installation
- Open a new Terminal window.
- Type
php -v
to check if PHP is installed correctly.
macOS Installation
1. Install PHP using Homebrew
- Open Terminal and run:
brew install php
2. Verify Installation
- Open Terminal and type
php -v
to verify the installation.
Note: After completing these steps, PHP is ready to use on your system.