What is PHP, it's History, How it Works under the hood in web

What is PHP, it's History, How it Works under the hood in web

Who is eligible for this course / Requirements

  1. Any person of any age is eligible
  2. Basic understanding about HTML
  3. Basic understanding about CSS

 

What is PHP and Who invented it

PHP Is a Server Side scripting language. PHP's full form is - Hypertext Preprocessor. It's nowadays one of the top programming language for web development and it's actually specially built for Web.

It's Inventor - Resmus Lerdorf who borns on 1968 and a Dutch Programmer. At 1994, He basically build this language first only for his Personal Homepage. You can get more about Lerdorf at Wikipedia.

 

How PHP Works

PHP is a server side scripting language. It stays on the server. let's clear some concept about server and client.

Client - We call our browser or Our PC a client. And a Browser can only work with some specific file like - HTML, CSS , JavaScript, image, pdf etc. It can not work with any file like - php, c#, python etc.

Server - When we request something to external link and get some response, that would be our server, which will serve those.

 

Steps how PHP Works:

Let's see a demo view first, then illustrate step by step -

How PHP works

  1. From browser or from our Client, we suppose search for - https://facebook.com
  2. When we hit this URL, it actually goes to a Server.
  3. Server then check if that file/resource exist on the server.
  4. Suppose, we request like https://facebook.com/index.php
  5. Here, index.php is a PHP file, which is in the servers location.
  6. Server then send this index.php file to a PHP interpretor.
  7. PHP interpretor then interprets code line by line and make an HTML file equivalent to that PHP file.
  8. PHP can also work with some other stuff like - Database, File Management, Mailing etc.
  9. Ok, it has the HTML file after interpreting, then it send back to Client or Browser the HTML file.
  10. Browser then read the HTML file and display it to browser screen.

 

Let's see a final demo how PHP actually works -

How PHP works

  

Next
Install PHP or Xampp in Windows / Linux / Mac - Easy PHP Server setup