Bug #4576 [NEW]: in Console_Getopt documentation example, should use ->getopt2(), not ->getopt()
| From: | mark dot meves at gmail dot com | Date: | Sun, 12 Jun 2005 15:58:21 +0000 |
| Subject: | Bug #4576 [NEW]: in Console_Getopt documentation example, should use ->getopt2(), not ->getopt() | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6306@lists.php.net to get a copy of this message | ||
From: mark dot meves at gmail dot com
Operating system: irrelevant
PHP version: 5.0.4
Package: Documentation
Bug Type: Bug
Bug description: in Console_Getopt documentation example, should use ->getopt2(), not
->getopt()
Description:
------------
in the code example on page
http://pear.php.net/manual/en/package.console.console-getopt.readphpargv.php
near the bottom of the page is example code
that demonstrates Console_Getopt->readPHPArgv().
it then uses Console_Getopt->getopt() but
it *should* be calling Console_Getopt->getopt2(),
because of the preceding array_shift() call on
the $argv array.
I am ashamed to admit this took me a couple hours to
figure this out. I had to read the source code,
which was excellent documentation in itself.
thanks for all the hard work,
-mark meves
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=4576&edit=1
--