O'Reilly logo

PHP CLI: Create Command Line Interface Scripts with PHP by Rob Aley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Robert Aley 2016

Rob Aley, PHP CLI, 10.1007/978-1-4842-2238-6_3

3. Understanding and Using the CLI SAPI

Rob Aley

(1)Oxford, UK

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required