Builder.com.au has this new article posted today with a good guide for working with the command-line version of 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.
They start off with basics, things like making it executable and creation of a simple program. They then move into taking in arguments on the command line and some of the options you can pass in too. Lastly, they demonstrate the interactive mode that the PHP CLI has to allow you to interpret PHP code on the fly...