schmittjoh/php-option
Some data may be outdated — see provenance labels.
Option Type for PHP observed · 2026-09-28
Health v2 · maintenance only
85/100
- Activity 91
- Release rhythm 68
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 128
- age_days: 5097
- days_rel: 58
- days_push: 58
- n_releases_24m: 4
Adoption not part of the score
2667 stars · 67 forks observed · 2026-09-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A PHP library implementing the Option type (Some/None) to represent optional values instead of returning null. It forces developers to explicitly handle both the value-present and value-absent cases, making APIs more robust.
Use cases
- avoid null pointer errors in php
- return optional values from repository methods
- make php apis null-safe
- wrap nullable values in a some/none type
- handle missing values explicitly in php
- functional option type for php
When to choose
- you want to eliminate fatal 'call to method on null' errors
- you are designing php apis that may or may not return a value
- you prefer explicit handling of absent values over null checks
When to avoid
- your codebase already uses php 8 nullable types and nullsafe operators
- you want a full functional programming toolkit rather than just the option type
Facets
library · maturity stable
error-handling developer-tools developer-tools programming-languages php option-type functional-programming null-safety maybe-monad
1 source
- readme: https://github.com/schmittjoh/php-option · fetched 2026-09-28 · c8367d2bf6b0
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| schmittjoh/php-option | main | 85 |
For agents
markdown · JSON · MCP: product_card(name="schmittjoh/php-option")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem