PHPackages                             bmt/assoc-array - 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. bmt/assoc-array

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

bmt/assoc-array
===============

Represents an associative array with string keys.

v1.0.0(2y ago)05MITPHP

Since May 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BMTmohammedtaha/assoc-array)[ Packagist](https://packagist.org/packages/bmt/assoc-array)[ RSS](/packages/bmt-assoc-array/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

AssocArray
==========

[](#assocarray)

`AssocArray` is a class that represents an associative array with string keys.

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

[](#installation)

You can install the `AssocArray` class via composer:

```
composer require bmt/assoc-array

```

Usage
-----

[](#usage)

To use the `AssocArray` class, you can follow these steps:

1. Create an instance of `AssocArray` by passing an associative array with string keys:

```
$data = ['id' => 5656, 'name' => 'jhon'];
$array = new AssocArray($data);
```

2. Access values in the associative array using array access syntax:

```
$id = $array['id'];
$name = $array['name'];
```

3. Check if a specific offset exists:

```
if (isset($array['id'])) {
    // Offset exists
} else {
    // Offset does not exist
}
```

Exceptions
----------

[](#exceptions)

The `AssocArray` class throws the following exceptions:

- `InvalidArgumentException` if the array structure is invalid.
- `RuntimeException` if you try to set or unset a value (read-only).

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

1082d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27a34c25ebb1d274100bd85ca3c7a8228b7581b6dd9b73bdffbaa40424ddb44e?d=identicon)[bmt](/maintainers/bmt)

---

Top Contributors

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

---

Tags

arrayassociationskeysphp

### Embed Badge

![Health badge](/badges/bmt-assoc-array/health.svg)

```
[![Health](https://phpackages.com/badges/bmt-assoc-array/health.svg)](https://phpackages.com/packages/bmt-assoc-array)
```

###  Alternatives

[ferdiunal/nova-editable-field

A Laravel Nova package to make fields editable.

104.6k](/packages/ferdiunal-nova-editable-field)

PHPackages © 2026

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