PHP stands for Hypertext Preprocessor. It is a common server side scripting language used for web development. All PHP code is ran on the server and can be embedded into HTML in between <?php and ?> tags. An example of a simple PHP script would be:
<!DOCTYPE html>
<html>
<head>
<title>Test PHP Script</title>
</head>
<body>
<?php
echo “Hello World”;
?>
</body>
</html>
What you are seeing is mostly HTML code and then inside of it is the server saying to output Hello World. When PHP is ran, it generates HTML code, unlike Javascript that is run in the browser and can be seen using the view source option. Everything in PHP is done on the server, so calculations, loops, etc would all be using the server’s resources, which means that the more complex your code is, the more the server’s CPU is going to be busy and as such it could time out the script. Most settings can be changed to allow for longer run times and prevent timeouts, but depending on how powerful your server is and what subsequent libraries you have, those settings could be drastically different from server to server.
PHP is simple enough that beginners can use it and get a basic knowledge pretty quickly, especially if you have an understanding of the fundamentals, but also an advanced user would be able to use it to make a pretty complex script.
What Can PHP Do?
To answer this question as simple as possible: anything. Server side scripting is the most common use of PHP, then pushing HTML based content, just like the example above. You can use it to be run without a browser using Linux or Windows shell commands or cron jobs/schedule tasks. The least common way to use it is to make desktop apps, it can be done using PHP-GTK.
PHP can be used on all major operating systems and it is robust enough to support many databases, including MySQL, PostgreSQL, MSSQL, and many others. Along with database extensions, there’s extensions for XML, Memcached, image processing, video processing, and many others.
If you’re going to be working on the server side of things, you will more than likely be running into PHP and knowing how to use it will be a big plus, whether it is to create complex scripts or simple ones to just display data from a database.