This is a PHP implementation of "getopt" supporting both short and long options. WWW: http://pear.php.net/manual/en/package.console.php