Installing PHP in Your Computer
For running PHP, you need a web server because PHP can’t directly deal with web requests. After installing, PHP acts as a sub-module of the web server which handles requests for PHP files.
PHP is free and supported by almost all recognized operating systems and web servers. Refer official documentation on how to configure PHP based on the operating system and the web server.
If you are new to web development, you may not have any experience on installing a web server. And most web applications rarely live without a database system. So you will also need to install a database system like MySQL. You need these installed in your computer to simulate a web server which is required for your PHP development.
If you are less experienced in this subject and going to install each of these manually, it can be a tedious task which would then decreases your enthusiasm on learning PHP. Therefore it’s recommended that you get these software products installed easily as possible.
Once you get your hands dirty with PHP, you can consider learning more on manual installations which would definitely be a plus when you are going to manage your own web server.
For many PHP applications, Apache has been the desired web server and MySQL has been the desired database system. Being free and providing advanced features are the main reasons for this popularity. AMP (Apache, MySQL, PHP) is a common abbreviation used for these three products.
Over time, Nginx (pronounced “engine X”) has become a popular alternative to Apache and the term LEMP (“engine X” in place of Apache) is also in use.
There are several AMP stacks available which let you install all three easily without digging into complex configuration instructions. XAMPP is such an AMP stack which is popular and available for Windows, Mac OS and Linux. Refer Working with XAMPP for installation and usage instructions.