Home » Console » Console_Getopt
Command-line option parser
This package is unmaintained.
Download latest release 1.4.3 (there might be newer Composer installable version)
License: BSD-2-Clause
Description
This is a PHP implementation of "getopt" supporting both
short and long options.
Documentation
Maintainers
- Andrei Zmievski (andrei) — lead, inactive
- Stig Bakken (ssb) — developer, inactive
- Greg Beaver (cellog) — helper, inactive
Dependencies
Required
- PHP (>= 5.4.0)
- PEAR Installer (>= 1.8.0)
Releases
- 1.4.3 (stable, 2019-11-20)
Release notes
License: BSD-2-Clause
* PR #4: Fix PHP 7.4 deprecation: array/string curly braces access
* PR #5: fix phplint warnings - 1.4.2 (stable, 2019-03-18)
Release notes
License: BSD-2-Clause
* Remove use of each(), which is removed in PHP 8
- 1.4.1 (stable, 2015-07-20)
Release notes
License: BSD-2-Clause
* Fix unit test on PHP 7 [cweiske]
- 1.4.0 (stable, 2015-02-22)
Release notes
License: BSD-2-Clause
* Change license to BSD-2-Clause
* Set minimum PHP version to 5.4.0
* Mark static methods with "static" keyword - 1.3.1 (stable, 2011-03-08)
Release notes
License: PHP License
* Change the minimum PEAR installer dep to be lower
- 1.3.0 (stable, 2010-12-11)
Release notes
License: PHP License
* Implement Request #13140: [PATCH] to skip unknown parameters. [patch by rquadling, improved on by dufuz]
- 1.2.3 (stable, 2007-06-12)
Release notes
License: PHP License
* fix Bug #11068: No way to read plain "-" option [cardoe]
- 1.2.2 (stable, 2007-02-17)
Release notes
License: PHP License
* fix Bug #4475: An ambiguous error occurred when specifying similar longoption name.
* fix Bug #10055: Not failing properly on short options missing required values - 1.2.1 (stable, 2006-12-08)
Release notes
License: PHP License
Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag)
- 1.2 (stable, 2003-12-11)
Release notes
License: PHP License
Fix to preserve BC with 1.0 and allow correct behaviour for new users
- 1.0 (stable, 2002-09-13)
Release notes
License: PHP License
Stable release
- 0.11 (beta, 2002-05-26)
Release notes
License: PHP License
POSIX getopt compatibility fix: treat first element of args
array as command name
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #369 | Closed | Bug | 2003-12-06 | GetOpt 1.1 breaks pearcmd | |
| #1499 | Bogus | Bug | 2004-05-25 | Console_Getopt does not support args with spaces | |
| #1831 | Closed | Bug | 2004-07-09 | Does not support = sign in argument value on longoptions | |
| #4448 | Closed | Bug | 2005-05-26 | Long parameter values truncated with longoption parameter | |
| #4475 | Closed | Bug | 2005-05-30 | An ambiguous error occurred when specifying similar longoption name. | |
| #7444 | Closed | Bug | 1.2 | 2006-04-20 | Trailing spaces after php closing tag |
| #10055 | Closed | Bug | 1.2.1 | 2007-02-08 | Not failing properly on short options missing required values |
| #10288 | Bogus | Bug | 1.2.2 | 2007-03-06 | Order of options causes incorrect return |
| #10363 | Closed | Bug | 1.2.2 | 2007-03-13 | E_NOTICE triggered in some cases |
| #10557 | Closed | Bug | 1.2.2 | 2007-03-29 | Not failing properly on LONG options missing required values (similar to 10055) |
| #11068 | Closed | Bug | 1.2.2 | 2007-05-17 | No way to read plain "-" option |
| #11620 | Bogus | Bug | 1.2.3 | 2007-07-17 | Notice: Undefined offset: 1 in Console/Getopt.php on line 214 |
| #11954 | Wont fix | Bug | 1.2.3 | 2007-09-01 | long opt return -- in option, short opt do not |
| #12663 | Wont fix | Bug | 1.2.3 | 2007-12-11 | Methods need to be declared as static |
| #13140 | Closed | Req | 1.2.3 | 2008-02-18 | [PATCH] to skip unknown parameters. |
| #13902 | Closed | Doc | 2008-05-14 | User note that is a documentation problem | |
| #14684 | Bogus | Bug | 1.2.3 | 2008-09-21 | console_getopt provides different results depending on platform used. |
| #14786 | Closed | Req | CVS | 2008-10-13 | Improve PHPCS results |
| #18989 | Closed | Bug | SVN | 2011-11-14 | remove error_reporting (for PEAR QA team) |
| #19578 | Duplicate | Bug | 1.3.1 | 2012-08-23 | throws warnings in strict mode |
| #20259 | Closed | Bug | SVN | 2014-04-28 | Please change license (move away from PHP license) |
| #23762 | Open | Bug | 1.4.1 | 2018-09-02 | Contains deperecated each() |
| #23771 | Open | Bug | 1.4.1 | 2018-09-28 | Missing argument in console_getopt |