Console_Getopt

Console_Getopt -- Command-line options parsing class

Console_Getopt::readPHPArgv

array readPHPArgv ()

Safely read the $argv PHP array across different PHP configurations. Will take care on register_globals and register_argc_argv ini directives

Returns

Console_Getopt::getopt

array getopt (string $args, string $shortoptions [, array $longoptions])

parses the command-line options

Parameter

Returns

Options

Getopt() support two types of options: short options and long options

The returned array

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, else the value is NULL.