What is PHP & XAMPP Installation

phpPHP stands for Hypertext Preprocessor.  Initially, it was known as Personal Home Page tools.  PHP was developed and introduced to the world very first in 1994 by Rasmus Lerdorf. PHP is server-side scripting language.  You must have a web server running to execute PHP script.  Since it is scripting language, there is no requirement of compiling it. HTML is good for creating static web pages.  PHP is designed to work with HTML and it will make your page content dynamic.  For dynamic web pages, you must know how to embed PHP code in your HTML code file.  The syntax of PHP is pretty much similar to C and Java.

PHP is open source and freeware.  PHP has cross-platform support.  This means you can run PHP script on Windows Server, Linux Server, and Mac Server.  A user does not need to have any specific software installed in his system to run PHP script.  Big sites like Yahoo and Facebook are using PHP.

PHP is completely object-oriented and has lots of features to make your website more user-friendly.  PHP has complete documentation like jQuery about its implementation and more features are being added to it with every new release.  The best part about PHP documentation is that it is available in various languages.  PHP also has very large and active developers community.  There are various PHP support forums available where you can ask any question regarding PHP.

To test our PHP script, we need to have local web server running in our system.  For this purpose, we are going to make use of XAMPP.  The installation of this software is very easy like any other software.  After installation, go to XAMPP control panel and start Apache server as shown in the image below.  The server usually runs at port 80, but because most of the softwares use port 80 for numerous reasons, you may encounter error while starting it, you can follow this guide to fix it.

xampp

By default, XAMPP gets installed in the C drive.  You must save all your PHP files in C:\xampp\htdocs folder and to test them, you can browse localhost or 127.0.0.1 which is a localhost IP address in your browser followed by location of PHP file in that folder.  For example, if you have saved your PHP file with the name as test.php then you need to type localhost/test.php or 127.0.0.1/test.php.  In case, you have changed port 80 to 8080, then it should be localhost:8080/test.php and 127.0.0.1:8080/test.php

Once this is done, you are good to go to write your very first PHP script.