In this chapter, you went beyond the web environment and learned how to use PHP for command-line shell scripting. Although Perl and shell scripts are the dominant players in this arena, writing PHP scripts allows you to re-use PHP and PEAR library code for offline maintenance tools. You have learned about
Parsing command-line options using PEAR Console_Getopt
Good shell script behavior
Dealing with standard input/output
Writing PHP servers
Hopefully, this is a powerful supplement to your PHP toolbox.