function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
    {
        return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
    }
function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
    {
        return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
    }
function getopt2 ( $ args , $ short_options , $ long_options = null , $ skip_unknown = false ) { return Console_Getopt :: doGetopt ( 2 , $ args , $ short_options , $ long_options , $ skip_unknown ) ; }
Parses the command-line options.

The first parameter to this function should be the list of command-line
arguments without the leading reference to the running program.

The second parameter is a string of allowed short options. Each of the
option letters can be followed by a colon ':' to specify that the option
requires an argument, or a double colon '::' to specify that the option
takes an optional argument.

The third argument is an optional array of allowed long options. The
leading '--' should not be included in the option name. Options that
require an argument should be followed by '=', and options that take an
option argument should be followed by '=='.

The return value is an array of two elements: the list of parsed
options and the list of non-option command-line arguments. Each entry in
the list of parsed options is a pair of elements - the first one
specifies the option, and the second one specifies the option argument,
if there was one.

Long and short options can be mixed.

Most of the semantics of this function are based on GNU getopt_long().

@param array  $args          an array of command-line arguments
@param string $short_options specifies the list of allowed short options
@param array  $long_options  specifies the list of allowed long options
@param boolean $skip_unknown suppresses Console_Getopt: unrecognized option

@return array two-element array containing the list of parsed options and
the non-option arguments
@access public
Parses the command - line options .