PHPackages                             pear/console\_getopt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. pear/console\_getopt

ActiveLibrary[CLI &amp; Console](/categories/cli)

pear/console\_getopt
====================

More info available on: http://pear.php.net/package/Console\_Getopt

v1.4.3(6y ago)8571.8M—3%1410BSD-2-ClausePHPCI failing

Since Feb 10Pushed 4y ago9 watchersCompare

[ Source](https://github.com/pear/Console_Getopt)[ Packagist](https://packagist.org/packages/pear/console_getopt)[ RSS](/packages/pear-console-getopt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (6)Used By (10)

Console\_Getopt - Command-line option parser
============================================

[](#console_getopt---command-line-option-parser)

This is a PHP implementation of "getopt" supporting both short and long options. It helps parsing command line options in your PHP script.

Homepage: [http://pear.php.net/package/Console\_Getopt](http://pear.php.net/package/Console_Getopt)

[![https://travis-ci.org/pear/Console_Getopt.svg?branch=master](https://camo.githubusercontent.com/2fb89ab87211b6e9f4f8c66115671f0cc704b48af62ff78e337ba22ea7489dbd/68747470733a2f2f7472617669732d63692e6f72672f706561722f436f6e736f6c655f4765746f70742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pear/Console_Getopt)Alternatives
------------

[](#alternatives)

- [Console\_CommandLine](http://pear.php.net/package/Console_CommandLine) (recommended)
- [Console\_GetoptPlus](http://pear.php.net/package/Console_GetoptPlus)

License
-------

[](#license)

BSD-2-Clause

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity66

Solid adoption and visibility

Community33

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~436 days

Total

5

Last Release

2371d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1323714f58f9144af310e5e4217e61b96ad7c42bc5c93a1f2d97deca95f6f4f8?d=identicon)[ashnazg](/maintainers/ashnazg)

![](https://www.gravatar.com/avatar/a1a2e6fe03f91204de2117430a748a12db2957eb113d4a50fc86d68d3c851e11?d=identicon)[cweiske](/maintainers/cweiske)

---

Top Contributors

[![ashnazg](https://avatars.githubusercontent.com/u/100170?v=4)](https://github.com/ashnazg "ashnazg (17 commits)")[![cweiske](https://avatars.githubusercontent.com/u/59036?v=4)](https://github.com/cweiske "cweiske (16 commits)")[![helgi](https://avatars.githubusercontent.com/u/70530?v=4)](https://github.com/helgi "helgi (5 commits)")[![till](https://avatars.githubusercontent.com/u/27003?v=4)](https://github.com/till "till (3 commits)")[![DavidPrevot](https://avatars.githubusercontent.com/u/3936728?v=4)](https://github.com/DavidPrevot "DavidPrevot (1 commits)")[![jfcherng](https://avatars.githubusercontent.com/u/6594915?v=4)](https://github.com/jfcherng "jfcherng (1 commits)")[![kenguest](https://avatars.githubusercontent.com/u/234118?v=4)](https://github.com/kenguest "kenguest (1 commits)")[![nikic](https://avatars.githubusercontent.com/u/216080?v=4)](https://github.com/nikic "nikic (1 commits)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (1 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![CloCkWeRX](https://avatars.githubusercontent.com/u/365751?v=4)](https://github.com/CloCkWeRX "CloCkWeRX (1 commits)")

### Embed Badge

![Health badge](/badges/pear-console-getopt/health.svg)

```
[![Health](https://phpackages.com/badges/pear-console-getopt/health.svg)](https://phpackages.com/packages/pear-console-getopt)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
