To install PHP, we will suggest you to install AMP (Apache, MySQL, PHP) software stack. It is available for all operating systems. There are many AMP options available in the market that are given below:
If you are on Windows and don t want Perl and other features of XAMPP, you should go for WAMP. In a similar way, you may use LAMP for Linux and MAMP for Macintosh.
Download and Install WAMP ServerClick me to download WAMP server
Download and Install LAMP ServerClick me to download LAMP server
Download and Install MAMP ServerClick me to download MAMP server
Download and Install XAMPP ServerClick me to download XAMPP server
How to install XAMPP server on windows
We will learn how to install the XAMPP server on windows platform step by step. Follow the below steps and install the XAMPP server on your system.
Click on the above link provided to download the XAMPP server according to your window requirement.
After downloading XAMPP, double click on the downloaded file and allow XAMPP to make changes in your system. A window will pop-up, where you have to click on the Next button.
Here, select the components, which you want to install and click Next.
Choose a folder where you want to install the XAMPP in your system and click Next.
Click Next and move ahead.
XAMPP is ready to install, so click on the Next button and install the XAMPP.
A finish window will display after successful installation. Click on the Finish button.
Choose your preferred language.
XAMPP is ready to use. Start the Apache server and MySQL and run the php program on the localhost.
How to run PHP programs on XAMPP, see in the next tutorial.
If no error is shown, then XAMPP is running successfully
you can put your code in c://xampp/htdocs/first.php
than open in your browser : - localhost/first.php