1.PHP can complete the following three types of work:
(1) Web server-side scripting
This is the most traditional and most important target area of PHP. This work requires the following three points: a PHP parser (CGI or server module), a Web server, and a Web browser. You need to install and configure PHP when you run your Web server, and then you can use a Web browser to access the output of your PHP program, which is to browse the service-side PHP page.
(2) Command line script
You can write a PHP script and don't need any servers or browsers to run it. In this way, only the PHP parser is required to execute. This usage is ideal for scripts that rely on the day-to-day running of cron (Unix or Linux environments) or Task Scheduler (Windows environments). These scripts can also be used to handle simple text.
(3) Writing desktop applications
PHP may not be the best language for a desktop application with a graphical interface, but if users are very proficient in PHP and want to use some of the advanced features of PHP in a client application, they can use PHP-GTK to write these programs. In this way, you can also write cross-platform applications.
Learning materials from:
http://php.net/manual/zh/intro-whatcando.php