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_5

5. PHP CLI Scripts and Your System

Rob Aley

(1)Oxford, UK

PHP CLI scripts typically interact with your system in a number of areas. While most system interactions are identical to those you’re used to with web scripts, there are a few areas you may not have used much, so I’ll cover a few gotchas that might trip you up.

Starting External Processes from PHP, or “Shelling Out”

A common feature of CLI scripts is calling and interacting with other scripts and processes. Using other scripts and programs as “building blocks” within your script is a common pattern of CLI programming. As you saw earlier, you can often combine your PHP script with others in general-purpose shell scripts, but ...

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