How PHP Works

PHP is considered to be a server side scripting language. What this means is that all the code is processed on the server before it is even given to you the user to view through your web browser.

How Does It Work?

Ok, I understand that I wasn’t too clear on how it worked exactly. Let’s take a look at this from the very first step: you enter a URL into your web browser. Your browser tells your computer that you would like to access a file at the URL you specified. Through the magic of computers your computer talks to the server where the file is located. The server then looks at the file to see what it needs to do.

Since it is retrieving an HTML document it knows to just send it to you. But wait, it actually is a PHP document and must parse some things in it first. So the server reads the document looking for those very important tags () and parses everything in the middle.

After doing that it sends the document for your browser to read. Your browser then reads the document and will then display the web page for you. Because your browser is limited (for security reasons) as to what it can and cannot do,