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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. henderjon/flags

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

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

a flag parser

v0.0.7(1mo ago)014.9k↓24.4%BSD-3-ClausePHPPHP &gt;=8.1

Since May 14Pushed 1mo 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 2w ago

READMEChangelogDependencies (4)Versions (8)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

45

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93% 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 ~129 days

Recently: every ~192 days

Total

7

Last Release

48d 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 (40 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)
```

###  Alternatives

[mwgg/airports

A JSON collection of ~29k entries with basic information about nearly every airport and landing strip in the world

7683.4k](/packages/mwgg-airports)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9845.4k](/packages/sauladam-shipment-tracker)[glauberportella/cnab-layouts-parser

Parser de arquivos de configuração CNAB gerados no projeto https://github.com/glauberportella/cnab-layouts

2154.5k](/packages/glauberportella-cnab-layouts-parser)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.4k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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