Chapter 17. Using PHP for Console Scripting

Although PHP is primarily a scripting language designed for developing Web applications, PHP offers much of the same functionality to non-Web (client) applications. This is accomplished though the CLI, or command-line interface, version of PHP. This customized version of PHP provides almost all the same functionality as the standard version of PHP, except it is designed to be run from the command line. Before we discuss the details, let's start by examining what's different between the Web-based and command-line versions of PHP.

Core CLI Differences

When you compare the CLI version of PHP to the standard version used for Web ...

Get PHP 5 Unleashed 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.