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