illustrate
1. SAPI provides an interface for PHP to communicate with the outside world. PHP uses this interface to interact with other applications.
2. Provides a variety of different SAPIs, common ones include: apache, apache2filter, apache2handler, cli, cgi, embed, fast-cgi, isapi, etc.
Example
php_sapi_name() — Returns the interface type between the web server and PHP. Possible returned values include aolserver, apache, apache2filter, apache2handler, caudium, cgi (until PHP 5.3), cgi-fcgi, cli, cli-server, continuity, embed, fpm-fcgi, isapi, litespeed, milter, nsapi, phttpd , pi3web, roxen, thttpd, tux and webjames.
The above is an introduction to SAPI in php, I hope it will be helpful to everyone.