Console_Getopt::getopt

Console_Getopt::getopt

Console_Getopt::getopt -- fetch the command-line options

Description

Parses the command-line options and returns them.

Parameter

  • array $args - an array of command-line arguments

  • string $shortoptions - specifies the list of allowed short options. See the "Options" section for more information.

  • array $longoptions - specifies the list of allowed long options. Default is NULL. See the "Options" section for more information.

Return value

array - two-element array containing the list of parsed options and the non-option arguments or a PEAR_Error.

Note

This function can not be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.