php summary

1.cgi & fastCgi
request(index.php)->webserver–(cgi)–>php interpreter(need to initialize environment every time)
cgi is a protocal,standardize the data transmitted between the web server and the php interpreter.(post data,header data,url,query string)

request(index.php)->webserver–(fastCgi)—>php interpreter(don’t need to initialize environment every time, a master will handle this)
fastCgi is a protocal as well. But instead initialize environment every time when a request comes in, fastCgi will create a master handle the initialization,and fork a php interpreter worker to handle the request.php-fpm is a fastCgi program.

2.psr
https://github.com/php-fig/fig-standards/tree/master/accepted
https://github.com/squizlabs/PHP_CodeSniffer

3.