PHP is server side web scripting language. So it is mainly work on server such as collect form data, generate dynamic page content, or send and receive cookies.
In summarize we can say that PHP can do the following things:
- Creating dynamic web pages
- Collecting form data
- Send or receive cookie
- Insert/update records of database
- Prevent unauthorized access
- Decode the data(i.e. encrypt)
- Server Side Script: This is tradition and mostly used php filed. Here we need code-editor, server and browser(showing result). If these three thing are available in your system, then your php program run successfully.
- Command line script: PHP code run through command without server and browser like as DOS command. To doing this we need only PHP parser. Example: This is executed using cron(on *nix or Linux) or task scheduler(Windows).
- Desktop application: PHP can desktop application. But this filed is rarely used in modern era because the php is not good with desktop application.