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'