PHPackages                             deoliveiralucas/array-keys-case-transform - 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. deoliveiralucas/array-keys-case-transform

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

deoliveiralucas/array-keys-case-transform
=========================================

Simple library to handle words case transformation from array keys

1.1.1(5y ago)0205.1k↓38.7%MITPHP &gt;=7.1.0

Since May 18Pushed 5y agoCompare

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

READMEChangelogDependencies (5)Versions (4)Used By (0)

ArrayKeysCaseTransform
======================

[](#arraykeyscasetransform)

[![Build Status](https://camo.githubusercontent.com/2c4a2d6323506ecc75bed3fe3d2ac30ad264cfd8e8b9659e9637e6b11839b09a/68747470733a2f2f7472617669732d63692e636f6d2f64656f6c6976656972616c756361732f61727261792d6b6579732d636173652d7472616e73666f726d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/deoliveiralucas/array-keys-case-transform)[![Code Coverage](https://camo.githubusercontent.com/6cfb0ba16853edf6e1b9032860ddddf6cbfca84303edb9cbef28ef3bef0f7dc6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656f6c6976656972616c756361732f61727261792d6b6579732d636173652d7472616e73666f726d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/deoliveiralucas/array-keys-case-transform/?branch=master)[![Code Quality](https://camo.githubusercontent.com/5ac6f007c5dda9d6b805b593cb9e0f135ff92a1a5cc93e0f7629aaec64cc65e4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656f6c6976656972616c756361732f61727261792d6b6579732d636173652d7472616e73666f726d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/deoliveiralucas/array-keys-case-transform/?branch=master)[![License MIT](https://camo.githubusercontent.com/db79b92834d905629b1aea42c9aa493da02060189e2af90840b1be5d6bf6ddf7/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](https://github.com/deoliveiralucas/array-keys-case-transform/blob/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/a94dd98f87ea234bbac68fe56065d05048e08f8b7e894cdb1a06bf5c555e496c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656f6c6976656972616c756361732f61727261792d6b6579732d636173652d7472616e73666f726d2e7376673f7374796c653d666c6174)](https://packagist.org/packages/deoliveiralucas/array-keys-case-transform)

Simple library to handle words case transformation from array keys.

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

[](#installation)

```
composer require deoliveiralucas/array-keys-case-transform

```

Usage
-----

[](#usage)

```
use ArrayKeysCaseTransform\ArrayKeys;

$input = [ 'first_key' => 'value' ];

print_r(ArrayKeys::toCamelCase($input));
/*
Output:
Array
(
    [firstKey] => value
)
*/

$input = [ 'firstKey' => 'value' ];

print_r(ArrayKeys::toSnakeCase($input));
/*
Output:
Array
(
    [first_key] => value
)
*/
```

Custom format
-------------

[](#custom-format)

```
use ArrayKeysCaseTransform\ArrayKeys;
use ArrayKeysCaseTransform\Transformer\AbstractTransformer;

$input = [ 'firstKey' => 'value' ];

$customTransform = new class extends AbstractTransformer {
    protected function format(string $key) : string {
        return str_replace('Key', 'CustomKey', $key);
    }
};

print_r(ArrayKeys::transform($customTransform, $input));
/*
Output:
Array
(
    [firstCustomKey] => value
)
*/
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

ArrayKeysCaseTransform is released under the MIT License. Please see [License File](LICENSE) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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 ~404 days

Total

3

Last Release

2113d ago

### Community

Maintainers

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

---

Top Contributors

[![lucasxciv](https://avatars.githubusercontent.com/u/5672800?v=4)](https://github.com/lucasxciv "lucasxciv (7 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")[![abdulrahman19](https://avatars.githubusercontent.com/u/22733622?v=4)](https://github.com/abdulrahman19 "abdulrahman19 (1 commits)")

---

Tags

arraytransformkeyscasecamelcasesnakecase

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/deoliveiralucas-array-keys-case-transform/health.svg)

```
[![Health](https://phpackages.com/badges/deoliveiralucas-array-keys-case-transform/health.svg)](https://phpackages.com/packages/deoliveiralucas-array-keys-case-transform)
```

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k411.1M1.2k](/packages/doctrine-collections)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k295.3M2.5k](/packages/symfony-property-access)[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[mattketmo/camel

Tiny library to handle words case transformation

29357.0k17](/packages/mattketmo-camel)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)

PHPackages © 2026

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