php-cli icon indicating copy to clipboard operation
php-cli copied to clipboard

It would be helpful if repeating an option would collect all values instead of just the last value

Open mcrump001 opened this issue 3 years ago • 1 comments

With the following command:

command --myopt=value1 --myopt=value2

Calling:

$options->getOpt('myopt')

would return an array containing all values:

['value1', 'value2']

instead, it currently returns a string containing the last value:

'value2'

mcrump001 avatar Dec 21 '22 16:12 mcrump001

Great library by the way - really like the minimal requirements!

mcrump001 avatar Dec 21 '22 16:12 mcrump001