As mentioned in the previous chapter, PHP CLI scripting involves using the PHP CLI SAPI. It’s therefore important to have a good grasp of how to use it, know the options for configuring and running it, and understand how it differs from the web-based SAPIs you are used to using. Luckily, the differences are minimal, and many are intuitive.
What’s Different About the CLI SAPI?
The following are the main differences between the CLI SAPI and the standard web implementation :
No HTTP headers are written to the output by default. This makes sense because they hold no meaning in the command line and so would be just extraneous ...