PHPackages                             ronappleton/php-key-changer - 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. ronappleton/php-key-changer

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

ronappleton/php-key-changer
===========================

Format Json string, object and array keys.

v1.1.0(5y ago)0171MITPHPPHP &gt;=7.4

Since Aug 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ronappleton/php-key-changer)[ Packagist](https://packagist.org/packages/ronappleton/php-key-changer)[ RSS](/packages/ronappleton-php-key-changer/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (1)

PhpKeyChanger
=============

[](#phpkeychanger)

[![Codacy Badge](https://camo.githubusercontent.com/560f4f6e390f4365517c8f0cc9e5a442e9f69a1587cd21b0deff645f03e60a94/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3631616262303435393965613439616362363233393632663137316233333065)](https://www.codacy.com/manual/ronappleton/php-key-changer?utm_source=github.com&utm_medium=referral&utm_content=ronappleton/php-key-changer&utm_campaign=Badge_Grade)[![Build Status](https://camo.githubusercontent.com/5b8312a0fdffb3010c58b4723a97b820c19676a618603983de65512f6486c9dd/68747470733a2f2f7472617669732d63692e6f72672f726f6e6170706c65746f6e2f7068702d6b65792d6368616e6765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ronappleton/php-key-changer)

Simple, PhpKeyChanger allows you to pass a json string, object or an array and it will recursively re-key the array using the case you give it.

- Camel Case
- Pascal Case
- Snake Case
- Kebab Case
- Studly Case

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

[](#installation)

*Note:* Php key changer requires php ^7.4

`composer require ronappleton/php-key-changer`

Usage
-----

[](#usage)

`use RonAppleton\PhpKeyChanger\PhpKeyChanger;`

`$reKeyed = PhpKeyChanger::reKey($array, 'snake');`

You can use any of the above cases, and you can pass in a Json object, a Json string or an Array, it will be return the same type that you pass in.

Credits
-------

[](#credits)

I used `Illuminate\Support\Str` as the basis of the StringConverters class`, many thanks Taylor Otwell and all contributors.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% 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 ~1 days

Total

3

Last Release

2097d ago

PHP version history (2 changes)v1.0.0PHP 7.4

v1.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e2afdd94a6f21a4ec2c5df569b80c1d47d6f5d0428f866f55c4bc117856b58b?d=identicon)[Ron Appleton](/maintainers/Ron%20Appleton)

---

Top Contributors

[![ronappleton](https://avatars.githubusercontent.com/u/3792420?v=4)](https://github.com/ronappleton "ronappleton (19 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ronappleton-php-key-changer/health.svg)

```
[![Health](https://phpackages.com/badges/ronappleton-php-key-changer/health.svg)](https://phpackages.com/packages/ronappleton-php-key-changer)
```

PHPackages © 2026

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