PHP can be used as a regular programming language. Good for mixed web/non web projects... and for people who are comfortable with PHP but not perl! Anyway, a list of commandline options and stuff is here:
http://php.planetmirror.com/manual/en/features.commandline.php