PHPackages                             marcusball/case-helper - 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. marcusball/case-helper

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

marcusball/case-helper
======================

Easily convert between camelCase, PascalCase, kebab-case, snake\_case, SCREAMING\_SNAKE\_CASE, Train-Case, and string case!

0.2.0(4y ago)2145.5k—2.8%13MITPHP

Since Dec 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/marcusball/case-helper)[ Packagist](https://packagist.org/packages/marcusball/case-helper)[ RSS](/packages/marcusball-case-helper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (3)

CaseHelper
==========

[](#casehelper)

Easily convert between camelCase, PascalCase, kebab-case, snake\_case, SCREAMING\_SNAKE\_CASE, Train-Case, and string case!

Note about fork
===============

[](#note-about-fork)

The original package, `nabil1337/case-helper`, has been abandoned and this repo has taken over ownership.

How to use
==========

[](#how-to-use)

```
use CaseHelper\CaseHelperFactory;

$ch = CaseHelperFactory::make(CaseHelperFactory::INPUT_TYPE_CAMEL_CASE);

$ch->toPascalCase('myStr');

// => returns 'MyStr'

```

You need to specify which type your input has when calling the factories' make()-method. To do that, use one of the following constants:

- CaseHelperFactory::INPUT\_TYPE\_SPACE\_CASE for `space case`
- CaseHelperFactory::INPUT\_TYPE\_CAMEL\_CASE for `camelCase`
- CaseHelperFactory::INPUT\_TYPE\_PASCAL\_CASE for `PascalCase`
- CaseHelperFactory::INPUT\_TYPE\_KEBAB\_CASE for `kebab-case`
- CaseHelperFactory::INPUT\_TYPE\_SNAKE\_CASE for `snake_case`
- CaseHelperFactory::INPUT\_TYPE\_SCREAMING\_SNAKE\_CASE for `SCREAMING_SNAKE_CASE`
- CaseHelperFactory::INPUT\_TYPE\_TRAIN\_CASE for `Train-Case`

Twig
----

[](#twig)

Want to use it with Twig? Check out [this](https://github.com/ninsuo/symfony-quickstart/blob/master/src/BaseBundle/Twig/Extension/CaseExtension.php) great example.

Tests
=====

[](#tests)

This project was mainly (although not completely) written using TDD. Tests can be run using phpunit.

Contributing
============

[](#contributing)

If you want to contribute, please follow the used standards and add or extend tests.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.9% 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 ~2412 days

Total

2

Last Release

1769d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a4e31e68a898293acb0f4366862356a25afdbd788c6060aeaa7b1781f3f48e5?d=identicon)[marcusball](/maintainers/marcusball)

---

Top Contributors

[![marcusball](https://avatars.githubusercontent.com/u/1077559?v=4)](https://github.com/marcusball "marcusball (9 commits)")[![nabil1337](https://avatars.githubusercontent.com/u/5262393?v=4)](https://github.com/nabil1337 "nabil1337 (7 commits)")[![ninsuo](https://avatars.githubusercontent.com/u/4152132?v=4)](https://github.com/ninsuo "ninsuo (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marcusball-case-helper/health.svg)

```
[![Health](https://phpackages.com/badges/marcusball-case-helper/health.svg)](https://phpackages.com/packages/marcusball-case-helper)
```

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/filesystem

Provides basic utilities for the filesystem

4.6k669.1M3.2k](/packages/symfony-filesystem)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[danielstjules/stringy

A string manipulation library with multibyte support

2.4k26.0M191](/packages/danielstjules-stringy)[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[voku/portable-utf8

Portable UTF-8 library - performance optimized (unicode) string functions for php.

52322.4M40](/packages/voku-portable-utf8)

PHPackages © 2026

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