In this new article from Builder.com.au today, they talk about the creation of something that I know I use a lot in my day-to-day activites - command-line PHP.
This document will introduce you to PHP's command-line interface (CLI), showing you how to interact with PHP programs at the command prompt.
PHP is most often used in combination with a Web server, to dynamically generate Web site pages. However, this Web server interface isn't the only way to use PHP, because the PHP distribution also includes a command-line interface which can be used to run PHP programs at the command prompt, much like Perl or bash.
It seems like some people forget that PHP can be used as extensively on the command line, and, for people like me that have forgotten more Perl than I ever knew, using my favorite language to create happy little shell scripts is a dream. In the article, they talk about what command-line PHP is, give a sample (basic) script, and show you how to use command line arguments and the command-line switches to modify the behavior of the PHP executable...




