PHPackages                             stein197/caser - 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. stein197/caser

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

stein197/caser
==============

String case converter and parser

1.0.0(4y ago)01.5kMITPHPPHP &gt;=8.1

Since Mar 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/stein197/php-caser)[ Packagist](https://packagist.org/packages/stein197/caser)[ RSS](/packages/stein197-caser/feed)WikiDiscussions main Synced 1mo ago

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

[![](https://camo.githubusercontent.com/248d36cdc77c9177d8285e4cce628192acbf0475bbee1bf55ef4a74e85dfc3c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f737465696e3139372f7068702d6361736572)](LICENSE)[![](https://camo.githubusercontent.com/80638047d4752f647ab9a3edf17285c5c3c8f23d4d2be225589d120486f00259/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737465696e3139372f6361736572)](https://camo.githubusercontent.com/80638047d4752f647ab9a3edf17285c5c3c8f23d4d2be225589d120486f00259/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737465696e3139372f6361736572)

String case converter and parser
================================

[](#string-case-converter-and-parser)

This tiny package provides means for converting strings between different cases - such as converting `camelCase` to `snake_case` and so on.

Installation
------------

[](#installation)

```
composer require stein197/caser

```

Usage:
------

[](#usage)

The package provides two functions and one enum:

```
use Stein197\Caser\Casing;
use function Stein197\Caser\convert;
use function Stein197\Caser\split;

convert('camelCase', Casing::Pascal); // 'CamelCase'
convert('PascalCase', Casing::Kebab); // 'pascal-case'
split("backgroundColor");             // ['background', 'Color']
```

The library automatically detects where it should split the string. There are 6 casing options available:

```
Casing::Camel;  // camelCase
Casing::Header; // Header-Case
Casing::Kebab;  // kebab-case
Casing::Pascal; // PascalCase
Casing::Snake;  // snake_case
Casing::Upper;  // UPPER_CASE
```

Composer scripts
----------------

[](#composer-scripts)

- `test` Run unit tests

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

1511d ago

### Community

Maintainers

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

---

Top Contributors

[![stein197](https://avatars.githubusercontent.com/u/35802538?v=4)](https://github.com/stein197 "stein197 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stein197-caser/health.svg)

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

###  Alternatives

[panakour/analytics

Get whatever data you want from google analytics.

267.6k](/packages/panakour-analytics)[seanstewart/plan-config

Plan config allows you to easily define attributes and limits for your SaaS application subscription plans.

314.0k](/packages/seanstewart-plan-config)[irail/stations

Use the Belgian railway's station in your PHP project

332.3k](/packages/irail-stations)

PHPackages © 2026

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