learn php free

PHP for absolute beginners

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 server side programming language. Now, we may use, Java, Python, node.js, ruby etc as the server side language. But, Php seems to be one of the popular choices mainly because it’s comparatively easier when compared to something like Java.  

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 Javapoint’s PHP tutorials here. If you are a more visual person and prefer video tutorials I’ve embedded Brad Traversy’s PHP course below.

Leave a Comment

Your email address will not be published. Required fields are marked *