function Console_Getopt::getopt
This function expects $args to start with the script name (POSIX-style). Preserved for backwards compatibility.
Parameters
array $args an array of command-line arguments:
string $short_options specifies the list of allowed short options:
array $long_options specifies the list of allowed long options:
Return value
array two-element array containing the list of parsed options and the non-option arguments
See also
getopt2()
File
-
vendor/
pear/ console_getopt/ Console/ Getopt.php, line 86
Class
- Console_Getopt
- Command-line options parsing class.
Code
public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false) {
return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}