Writing PHP Command-Line Applications: Command-Line Arguments
TL;DR: $argv is an array of arguments passed to the script with the first index being the name of the script itself. And $argc is the number of arguments passed to the the script (which will always at least be 1). Arguably, pun intended, one of the key pieces of command-line application is making sure…