First we all know that PHP is a server side scripting language for that the reason we need a server to run PHP.
In learning time you don’t need to buy online server. You can run PHP by creating local server.
Basically in this tutorial, you will learn how to setup your local server to run PHP.
Create local server
You can create local server by installing XAMPP software. Or you can use WAMP. But I recommend you use XAMPP.
Why use XAMPP ?
First you need to know, if you don’t install XAMPP, So how you can setup your local server ?
Without XAMPP you can setup your PHP Environment by installing Apache Server, MySQL Database OR MariaDB, and PHP separately.
But if you’ll install XAMPP you don’t install those applications separately. XAMPP will install Apache, MariaDB, PHP and Perl on your Machine.
How to install XAMPP on Windows ?
First download Latest version of XAMPP Installer from Here.
After download, double click on XAMPP installer.
Now click on Ok
Click on next
Again click on Next
Choose folder where you want to install. I suggest you go with default.
If you want to learn more about XAMPP then click on Next otherwise uncheck the check box and then click on Next.
Click on Next to start installation process.
Wait. XAMPP installation process is going on.
If you face this then ignore the not recommended option and choose another option and then click on Allow access.
After the installation is completed then click on next and choose your language and then click on save button.