PHPackages                             wikimedia/cldr-plural-rule-parser - 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. wikimedia/cldr-plural-rule-parser

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

wikimedia/cldr-plural-rule-parser
=================================

Evaluates plural rules specified in the CLDR project notation.

v3.0.1(2mo ago)9853.8k—0.8%1GPL-2.0-or-laterPHPPHP &gt;=8.1

Since Aug 28Pushed 1w ago16 watchersCompare

[ Source](https://github.com/wikimedia/CLDRPluralRuleParser)[ Packagist](https://packagist.org/packages/wikimedia/cldr-plural-rule-parser)[ Docs](https://www.mediawiki.org/wiki/CLDRPluralRuleParser)[ RSS](/packages/wikimedia-cldr-plural-rule-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (14)Versions (5)Used By (1)

CLDRPluralRuleParser
====================

[](#cldrpluralruleparser)

CLDRPluralRuleParser is a PHP library for parsing [plural rules](http://cldr.unicode.org/index/cldr-spec/plural-rules) specified in the [CLDR project](http://cldr.unicode.org/index).

This library does not contain the rules from the CLDR project, you have to get them yourself.

Here is how you use it:

```
use CLDRPluralRuleParser\Evaluator;

// Example for English
$rules = ['i = 1 and v = 0'];
$forms = ['syntax error', 'syntax errors'];

for ( $i = 0; $i < 3; $i++ ) {
	$index = Evaluator::evaluate( $i, $rules );
	echo "This code has $i {$forms[$index]}\n";
}

// This code has 0 syntax errors
// This code has 1 syntax error
// This code has 2 syntax errors
```

License
-------

[](#license)

The project is licensed under the GPL license 2 or later.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor3

3 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 ~1301 days

Total

4

Last Release

60d ago

Major Versions

v1.0.0 → v2.0.02021-02-11

v2.0.0 → v3.0.02025-11-25

PHP version history (3 changes)v1.0.0PHP &gt;=5.3.3

v2.0.0PHP &gt;=7.2.9

v3.0.0PHP &gt;=8.1

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/716c86d71cbf921e7912a505f89d799de398fc0a3af0bd4c8862834b2d642bd7?d=identicon)[wikimedia](/maintainers/wikimedia)

---

Top Contributors

[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (13 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (8 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (7 commits)")[![legoktm](https://avatars.githubusercontent.com/u/81392?v=4)](https://github.com/legoktm "legoktm (4 commits)")[![Krinkle](https://avatars.githubusercontent.com/u/156867?v=4)](https://github.com/Krinkle "Krinkle (3 commits)")[![ricordisamoa](https://avatars.githubusercontent.com/u/4588496?v=4)](https://github.com/ricordisamoa "ricordisamoa (2 commits)")[![DannyS712](https://avatars.githubusercontent.com/u/46829944?v=4)](https://github.com/DannyS712 "DannyS712 (2 commits)")[![nemoralis](https://avatars.githubusercontent.com/u/50991261?v=4)](https://github.com/nemoralis "nemoralis (2 commits)")[![mdew192837](https://avatars.githubusercontent.com/u/6820349?v=4)](https://github.com/mdew192837 "mdew192837 (1 commits)")[![doguabaris](https://avatars.githubusercontent.com/u/135986694?v=4)](https://github.com/doguabaris "doguabaris (1 commits)")[![Daimona](https://avatars.githubusercontent.com/u/38216014?v=4)](https://github.com/Daimona "Daimona (1 commits)")[![Nikerabbit](https://avatars.githubusercontent.com/u/1109395?v=4)](https://github.com/Nikerabbit "Nikerabbit (1 commits)")[![somechris](https://avatars.githubusercontent.com/u/3330451?v=4)](https://github.com/somechris "somechris (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wikimedia-cldr-plural-rule-parser/health.svg)

```
[![Health](https://phpackages.com/badges/wikimedia-cldr-plural-rule-parser/health.svg)](https://phpackages.com/packages/wikimedia-cldr-plural-rule-parser)
```

###  Alternatives

[spatie/laravel-robots-middleware

Add an `all` or `none` robots header to your requests via a middleware in Laravel

3372.2M5](/packages/spatie-laravel-robots-middleware)[laminas/laminas-config-aggregator

Lightweight library for collecting and merging configuration from different sources

404.4M142](/packages/laminas-laminas-config-aggregator)[anhskohbo/u-convert

Chuyển đổi qua lại giữa các bảng mã Unicode, VNI, TCVN3... của Việt Nam

281.3k](/packages/anhskohbo-u-convert)

PHPackages © 2026

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