PHPackages                             pagon/argparser - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pagon/argparser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pagon/argparser
===============

arg parser for php

0.2.1(13y ago)41.2k21MITPHPPHP &gt;=5.3.0

Since Feb 28Pushed 13y agoCompare

[ Source](https://github.com/hfcorriez/php-argparser)[ Packagist](https://packagist.org/packages/pagon/argparser)[ RSS](/packages/pagon-argparser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (1)

Intro
-----

[](#intro)

ArgParser is a PHP library that help you parse the CLI arguments

Examples
--------

[](#examples)

```
$arg_parser = new \Pagon\ArgParser();

// Add a short arguments and support enum type
$arg_parser->add('a', array('help' => 'a long time with he happy', 'enum' => array(
    'go' => 'do some thing with go'
)));

// Add long and short arguments
$arg_parser->add('--long|-l', array('help' => 'long arguments', 'enum' => array('a', 'b')));

// Will get the arguments you want
$args = $arg_parser->parse();

// Print the help message
echo $arg_parser->help();
```

License
-------

[](#license)

(The MIT License)

Copyright (c) 2012 hfcorriez &lt;&gt;

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~23 days

Total

3

Last Release

4780d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/052da9fcd2d35025de486c255a8b4d38a67b2626b6ca626f6681bbc00187e62b?d=identicon)[hfcorriez](/maintainers/hfcorriez)

---

Top Contributors

[![hfcorriez](https://avatars.githubusercontent.com/u/119550?v=4)](https://github.com/hfcorriez "hfcorriez (10 commits)")

---

Tags

argumentsargparserarguments parser

### Embed Badge

![Health badge](/badges/pagon-argparser/health.svg)

```
[![Health](https://phpackages.com/badges/pagon-argparser/health.svg)](https://phpackages.com/packages/pagon-argparser)
```

###  Alternatives

[timacdonald/has-parameters

A trait that allows you to pass arguments to Laravel middleware in a more PHP'ish way.

228271.7k2](/packages/timacdonald-has-parameters)[rybakit/arguments-resolver

ArgumentsResolver allows you to determine the arguments to pass to a function or method.

26107.7k7](/packages/rybakit-arguments-resolver)[watson/breadcrumbs

Breadcrumbs made easy for Laravel.

4542.9k](/packages/watson-breadcrumbs)[chasegiunta/scss

Compiler for SCSS

148.6k1](/packages/chasegiunta-scss)

PHPackages © 2026

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