Requirements
PHP is a server-side scripting language. Thus, you need a server to be able to use PHP. To do this on your local machine, you need to have an Apache web server, PHP engine and a MySQL database server.
Download and Installation
To download PHP, you can go to the official PHP website:
- Unix Systems (https://www.php.net/manual/en/install.unix.php)
- MacOS (https://www.php.net/manual/en/install.macosx.php)
- Windows Systems (https://www.php.net/manual/en/install.windows.php)
After downloading, open the files and follow the instructions to install PHP in your system.
Preconfigured Packages
You can also download and install preconfigured packages for your system. The most popular of these packages are XAMPP and WampServer.
- XAMPP download (https://www.apachefriends.org/index.html)
- WampServer download (https://www.wampserver.com/en/)
Online Compiler
For simple codes you can directly access our online compiler in the tutorials. This compiler can execute codes that does not involve files and file handling. No installation is required and it is free to use, so you can test your code directly while learning PHP.