ulrichsg/getopt-php — pull request #8 by alexkappa (2012-12-13 16:35:37+00:00)
Title: Added a showHelp() method that prints a help message

```php
$getopt = new Getopt(array(
array('a', 'alpha', Getopt::NO_ARGUMENT, 'description of a'),
array('b', 'bravo', Getopt::REQUIRED_ARGUMENT, 'description of bravo'),
array('c', 'charlie', Getopt::OPTIONAL_ARGUMENT, 'description of charlie')
));

$getopt->parse();

$getopt->showHelp();
```
Which prints a command line message
```console
usage: mysqcript.php [options] [operands]
-a, --alpha description of a
-b, --bravo description of bravo
-c, --charlie [charlie] description of charlie
```