What does this PHP code mean

What is php

(recursive acronym for) is a widespread open source scripting language intended for general use, which is especially suitable for web programming and can be embedded in HTML.

Nice, but what does that mean exactly? An example:

Example # 1 An introductory example

Instead of writing a program with lots of instructions for outputting HTML, write some HTML and embed some instructions that do something (like saying "Hello, I'm a PHP script!"). The PHP code stands between special start and end processing instructions and, with which you can switch to "PHP mode" and back.

PHP differs from client-side languages ​​such as Javascript in that the code is executed on the server and there generates HTML output that is sent to the client. So the client only gets the result of the script execution, with no way of finding out what the actual code looks like. You can also tell your web server to parse all of your HTML files with PHP, because then there really isn't anything that tells the user what you have up your sleeve.

The best part about using PHP is that it is extremely easy for newbies to use, but also has a huge range of features for the professional programmer. Don't be afraid to read the long list of PHP functions. You can get started and start writing simple scripts within a few hours.

While PHP development is focused on server-side programming, you can do a lot more with PHP. Read more in the What can PHP do? or use the introductory tutorial if you are only interested in web programming.

There are no user contributed notes for this page.