PHPackages                             henderjon/flags - 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. henderjon/flags

ActiveLibrary

henderjon/flags
===============

a flag parser

v0.0.6(10mo ago)08.4k—2.9%BSD-3-ClausePHPPHP &gt;=8.1

Since May 14Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/henderjon/flags)[ Packagist](https://packagist.org/packages/henderjon/flags)[ Docs](http://github.com/henderjon/flags)[ Fund](https://www.buymeacoffee.com/henderjon)[ Fund](https://www.paypal.me/henderjon/10)[ RSS](/packages/henderjon-flags/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

flags
=====

[](#flags)

Flags takes an object, parses it's properties and methods and evaluates a given array (e.g. $argv) and populates the object with the given array.

Flags uses Attributes to parse/echo documentation.

For example usage, see the [example](example/example.php)

special cases
-------------

[](#special-cases)

- To set a bool true simply use it (e.g. `-var`). To set it's value it is required to use the equal sign (e.g. -var=false)
- `-help` or `--help` will always print DocStings
- when combing custom types, nullables, default values, and shadow methods, it can be tricky to make sure that everything that OUGHT to be nullable, is so
- errors/exception in the vein of `Argument #1 ($v) must be of type $TYPE, null given` that means that the expected type of the property, shadow function parameter, and shadow function return type don't match. Specifically, nullable types require everything else to be nullable, especially when it's a complex type that is nullable and defaults to null as a value.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance53

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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 ~81 days

Recently: every ~100 days

Total

6

Last Release

328d ago

PHP version history (2 changes)v0.0.1PHP &gt;=8.0

v0.0.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/15bb251b7550dc9a7ee1a7642fd6c4534f72797a17b3c913e9a15a4462979612?d=identicon)[henderjon](/maintainers/henderjon)

---

Top Contributors

[![henderjon](https://avatars.githubusercontent.com/u/114275?v=4)](https://github.com/henderjon "henderjon (39 commits)")[![donatj](https://avatars.githubusercontent.com/u/133747?v=4)](https://github.com/donatj "donatj (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/henderjon-flags/health.svg)

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

PHPackages © 2026

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