© Robert Aley 2016

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

2. An Overview of CLI Programming in PHP

Rob Aley

(1)Oxford, UK

Getting Away from the Web

This chapter takes a look at the basic steps involved in breaking free from the Web with PHP. I’ll cover the technical steps involved and also the differences in programming practices and focus.

PHP Without a Web Server

Most PHP programmers have used PHP strictly in a web server environment. In such an environment, PHP is a CGI/Fast GGI or server module called and controlled by the HTTP server (usually Apache, IIS, Nginx, or similar). The HTTP server receives a request for a PHP-based web page and calls the PHP process to execute it, which usually returns output to the HTTP server to be sent on ...

Get PHP CLI: Create Command Line Interface Scripts with PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.