ulrichsg/getopt-php — pull request #43 by tistre (2014-11-30 20:09:51+00:00)
Title: Single hyphen fixes; "-" value/operand for stdin/stdout

In many Unix tools, the single hyphen “-” stands for stdin or stdout. I want to follow this convention in my PHP CLI scripts. But Getopt.php failed with one of these errors when I used “-” as option value or operand:

UnexpectedValueException: Option '' is unknown
UnexpectedValueException: Option 'a' must have a value

My commit seems to fix these problems. If it looks fine to you, it would be great to have it included in the next release of Getopt.php. Thanks for creating Getopt.php, and for making it open source!

P.S.: Sorry that this pull request includes the GetoptTest.php changes from my previous request. I’m a Git newbie and haven’t learned how to do proper branches yet.