Before starting the installation, you need to be sure what exactly you want to do with PHP. As we have already discussed PHP can be used in three main areas:
1. Websites and web applications development (which is called server-side scripting)
2. Command line scripting
3. Desktop (Graphical User Interface) applications
Now if you want to run PHP on your PC, then you need to need to setup three main components given below:
PHP Parser Installation:
You can download the latest PHP version from the official website of PHP.
Click here to download PHP latest version:
Now extract the files and install the PHP parser.
Apache Server Installation:
Apache is the most commonly used server with PHP parser. So you can download the latest Apache server from the official website of Apache.
Click here to download the latest version of Apache: https://httpd.apache.org/download.cgi
And now install the Apache server in your local PC.
MySQL database Installation:
Now another important component is MySQL database server for developing dynamic websites. So download the latest version of MySQL from the official website.
Click here to download the latest MySQL community version:
And now install the MySQL.
Other ways to install PHP environment on your local PC:
WAMP Server for PHP Installation:
WAMP Server is a Windows based web development environment. It allows you to create web applications using Apache2, PHP and a MySQL database. You can use WAMP server to setup all the three components PHP, MySQL and Apache. This is the quick and easy way to setup PHP environment. So you can download the WAMPserver from the official website.
Click here to download WAMP server from here: http://www.wampserver.com/en/
Now finally you are all done with PHP environment setup. So use the following localhost link in your browser’s window.
http://127.0.0.1/info.php or http://localhost/info.php