Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Pure PHP:
PHP Command Line Rocks
May 20, 2005 @ 11:23:54

Posted a little while back, this quick blog entry still seems useful - a simple PHP command-line handler class.

Recently I wrote a PHP Command line app, I was amazed, how easy it was, to write command line app in PHP, and it really rocks. Here is very simple Command Line handler class, it may be useful for your apps.

It's a very simple little script, but what I liked about it was his inclusion of the "try these functions" ability in the run() function. It makes the script more "self-aware" of what functionality it has to offer to the users instead of just letting them blindly enter commands. I've seen some pretty nice PHP CLI scripts before, and this sort of class has always been a good starting place for them. Making interactive PHP scripts is as simple as any other language (even extraction and report languages). A lot of people overlook the command-line PHP in favor of the web-based pages, but they're missing out on all of the power and flexibility that it has to offer...

tagged:

Link:


Trending Topics: