The CLI PHP script operates differently in its environment compared to its
web-server embedded counterpart. Shell scripts are running in their own pro-
cess, containing PHP and nothing else. Inside a web server, PHP shares the
process with the web server itself and any other modules the web server may
have loaded. The web server environment has many restrictions because of
this. For example, who gets standard input? What about signals, and what
happens if you fork (duplicate) the process? Usually all of these types of
resources are managed by the hosting web server. (more…)
