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.2(1mo ago)9866.0k↑24.8%1GPL-2.0-or-laterPHPPHP &gt;=8.1

Since Aug 28Pushed 1w ago17 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 2w ago

READMEChangelogDependencies (21)Versions (6)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

63

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity76

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

Total

5

Last Release

59d 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

[rappasoft/laravel-livewire-tables

A dynamic table component for Laravel Livewire

2.0k3.0M31](/packages/rappasoft-laravel-livewire-tables)[szeidler/composer-patches-cli

28263.9k4](/packages/szeidler-composer-patches-cli)[wa72/html-pretty-min

HTML minifier and indenter that works on the DOM tree

22234.6k8](/packages/wa72-html-pretty-min)[veewee/reflecta

Unleash the Power of Optics in your code!

13477.2k7](/packages/veewee-reflecta)[apen/additional_reports

Useful information in the reports module : xclass, ajax, cliKeys, eID, general status of the system (encoding, DB, php vars...), hooks, compare local and TER extension (diff), used content type, used plugins, ExtDirect... It can really help you during migration or new existing project (to have a global reports of the system).

13170.7k](/packages/apen-additional-reports)[antistatique/swisstopo

Convert GPS (WGS84) to Swiss (LV03 and LV95) coordinates (and vice versa)

1481.8k](/packages/antistatique-swisstopo)

PHPackages © 2026

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