After slugging through the preliminary information necessary to understand developing PHP in a nonweb context, you’re now getting to the nitty-gritty of how to start communicating with your users without the rendering engine of a web browser.
Command-Line Interface Basics
Although graphical interfaces seem to garner the most attention these days, there are still plenty of uses for text-based interfaces, particularly in environments with technically adept users. When creating a text-based program to run on the command line, there are three primary considerations over and above the PHP you are already accustomed to.
Getting keyboard input ...