getopt

getopt

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

getoptGets options from the command line argument list

Description

array getopt ( string $options [, array $longopts [, int &$optind ]] )

Parses options passed to the script.

Parameters

options
Each character in this string will be used as option characters and matched against options passed to the script starting with a single hyphen (-). For example, an opti