What can PHP do ?

Anything that you want to do on a web server, you can do with PHP.
There are three main areas where PHP scripts are used:-

1) Server-side scripting.

2) Command line scripting:- There is no need any server and web browser to run .  You only need the PHP parser to use it this way.

3) Writing desktop applications:- PHP is probably not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client-side applications you can also use PHP-GTK to write such programs applications.