PHPackages                             eufony/inflector - 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. eufony/inflector

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

eufony/inflector
================

Common interfaces for inflection libraries.

v2.1.1(3y ago)024LGPL-3.0-or-laterPHPPHP ^8.0

Since Feb 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/eufony/inflector)[ Packagist](https://packagist.org/packages/eufony/inflector)[ RSS](/packages/eufony-inflector/feed)WikiDiscussions v2.x Synced 1mo ago

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

The Eufony Inflector Package
============================

[](#the-eufony-inflector-package)

 [ ![Packagist Downloads](https://camo.githubusercontent.com/bbc0dbd5a672b14487634ef8e691b348b85f256902863ca512b7e697686695ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6575666f6e792f696e666c6563746f723f6c6162656c3d5061636b6167697374253230446f776e6c6f616473) ](https://packagist.org/packages/eufony/inflector) [ ![GitHub Stars](https://camo.githubusercontent.com/72344358924cb117310c18a2b9fe7bbf18156c28d8c53a422786d88f09510fd6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6575666f6e792f696e666c6563746f723f6c6162656c3d4769744875622532305374617273) ](https://github.com/eufony/inflector) [ ![Issues](https://camo.githubusercontent.com/8086397390dbc55e3cf0f2c361bffc077bb20dc1f642f8dd685af92e04f96942/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6575666f6e792f696e666c6563746f722f6f70656e3f6c6162656c3d497373756573) ](https://github.com/eufony/inflector/issues)
 [ ![License](https://camo.githubusercontent.com/e33a9ab9fa6e2f13c4e018715db3c2ba1672603bef1a29399b79423cb7519b91/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6575666f6e792f696e666c6563746f723f6c6162656c3d4c6963656e7365) ](https://github.com/eufony/inflector#license) [ ![Community Built](https://camo.githubusercontent.com/db7f0b0f807877959a4badf1f8b12ae274bdf86899e95fc41e39aefb6ba5cc1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d616465253230776974682d2545322539442541342d726564) ](https://github.com/eufony/inflector#contributing)

*eufony/inflector provides a standardized interface for linguistic inflection libraries.*

*eufony/inflector* is a PHP library that aims to improve interoperability between linguistic inflection implementations. It provides a common interface for changing the capitalization of strings, as well as the pluralization and singularization of words.

Interested? [Here's how to get started.](#getting-started)

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

*eufony/inflector* is released as a [Packagist](https://packagist.org/) package and can be easily installed via [Composer](https://getcomposer.org/) with:

```
composer require "eufony/inflector"

```

### Basic Usage

[](#basic-usage)

*eufony/inflector* provides `InflectorInterface`, which defines the following methods:

```
// Convert between `PascalCase`, `snake_case`, and `camelCase`.
echo $inflector->toPascalCase($string);
echo $inflector->toSnakeCase($string);
echo $inflector->toCamelCase($string);

// Convert between pluralized and singularized words.
echo $inflector->pluralize($string);
echo $inflector->singularize($string);
```

It also provides a couple of pseudo-implementations to get you started:

```
// A fake implementation based on the Null Object Pattern
// that returns any string it is given without any modifications.
$inflector = new NullInflector();

// A wrapper class to manually define exceptions to the return values of another implementation.
$inflector = new ExceptionAdapter($inflector, cases: [["id", "id", "ID"]], words: ["moose", "meese"]);

// A wrapper class around the inflector implementation by the Doctrine project.
$inflector = new DoctrineInflector();
```

Contributing
------------

[](#contributing)

Found a bug or a missing feature? You can report it over at the [issue tracker](https://github.com/eufony/inflector/issues).

License
-------

[](#license)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see .

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

7

Last Release

1193d ago

Major Versions

v1.0.0 → v2.0.02023-02-05

v1.0.1 → v2.1.12023-02-08

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b73d2ffc86da306523c3c4fb19e002ba203ed2819b14db27d7b510bb58b2c3d?d=identicon)[ahgencer](/maintainers/ahgencer)

---

Top Contributors

[![ahgencer](https://avatars.githubusercontent.com/u/33004442?v=4)](https://github.com/ahgencer "ahgencer (19 commits)")

---

Tags

eufonyinflectioninflectorphpinflectorinflectioneufony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eufony-inflector/health.svg)

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

###  Alternatives

[doctrine/inflector

PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.

11.4k855.8M711](/packages/doctrine-inflector)[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8351.3M7](/packages/wapmorgan-morphos)[mmucklo/inflect

inflect - a memoizing inflector for php

4023.1M13](/packages/mmucklo-inflect)[heureka/inflection

Czech inflection library

6163.9k](/packages/heureka-inflection)[wapmorgan/yii2-inflection

Inflection extension for Yii2. Support for English / Russian languages to inflect words / names / numbers / money / date&amp;time.

32112.3k](/packages/wapmorgan-yii2-inflection)[mikulas/inflection

Czech inflection library

2959.1k](/packages/mikulas-inflection)

PHPackages © 2026

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