TL;DR: I’ve been writing PHP command-line scripts to help automate mundane tasks. As these tasks are growing in complexity or turning more into applications that interface with third-party APIs, I’m documenting the things I find important that others may also find helpful.
There are three things necessary to get a basic script up and running on your local machine (assuming you already have PHP installed):
- Know the path to the PHP binary,
- Make sure your script references said binary,
- And make the script executable.