What is PHP?
PHP is a server-side programming language. Now, what does that mean? Basically, HTML, CSS, and JavaScript run on the client’s computer. When a website is loaded, you can “right click” on the page and click on “View Page Source” and you can read the HTML, CSS and JavaScript code. But, you cannot do the same with PHP.
Your PHP code gets executed on the server. After the execution, it sends the HTML back to the client’s browser. So, if I ever run
<?php echo date(“Y”); ?>
to get the current year, when I view the source, all I see is HTML.
So, if we need to hide how our site operates in the backend, we use a
How to run a PHP file?
To run a PHP you need to have local PHP server setup.
The easy way to do so is to install XAMPP or WAMP/LAMP/MAMP.
NOTE: WAMP stands for Windows, Apache, MySQL, PHP
L in LAMP stands for Linux
M in MAMP stands for MAC
XAMPP is available on all platforms
You can just Google and install one of these for your platform. The installation is as easy as next, next, finish. Although, I’ll provide the installation guide for XAMPP here.
Alternately, to test things out, you may use online tools like PHPFiddle.
How can I learn PHP?
You can refer to
Thanks for sharing this step by step information about PHP and read your complete post, you have explained in really very understanding method so keep posting such informative blog post.