doctrine/inflector ? reverse-engineered prompt

Reverse engineered prompt

Build me a small PHP library that helps with word changes, especially singular and plural forms, and simple uppercase and lowercase string handling.

I want it to work like a clean reusable package, with a sensible public API for turning words like person into people, cars into car, and for handling different casing in a predictable way. Please include solid tests for the main cases and edge cases, since this kind of library lives and dies by correctness.

Keep it lightweight and easy to use in other PHP projects. If there are any tricky rules or current best practices for inflection behavior, look them up online if you need to. I also want the code to be tidy and maintainable, with the usual project files you’d expect for a real library, so it can be installed and used right away.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab