PHPackages                             pader/weak-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. pader/weak-array

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

pader/weak-array
================

Array weak reference with value.

1.0.1(3y ago)011MITPHPPHP &gt;=8.0.0

Since Jan 7Pushed 3y ago1 watchersCompare

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

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

PHP Weak Reference Array.
=========================

[](#php-weak-reference-array)

An ArrayAccess implement let you can storage a weak reference object in array by any key type.

This like an temporary cache, help you to reuse same object when it's still use in other place, and will auto unset the item when all reference is destruct.

Install
-------

[](#install)

Require php version &gt;= 8.0.0

```
composer require pader/weak-array
```

Simple example:
---------------

[](#simple-example)

```
$hello = new stdClass;
$hello->value = 'hello';
$world = new stdClass;
$world->value = 'world';

$arr = new WeakArray();
$arr[] = $hello;
$arr['foo'] = $world;

var_dump($arr[0]);
var_dump($arr['foo']);

unset($hello);

var_dump($arr[0]); //Should be null
var_dump($arr['foo']);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~3 days

Total

2

Last Release

1222d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7917840032121e7f70f6d673d5481a7f2c37f2abcf81020ceac17394af44fc13?d=identicon)[pader](/maintainers/pader)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/pader-weak-array/health.svg)

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

###  Alternatives

[phpoption/phpoption

Option Type for PHP

2.7k541.2M159](/packages/phpoption-phpoption)[kmlaravel/laravel-geographical-calculator

laravel package help you to implement geographical calculation, with With several algorithms that help you deal with coordinates

42677.2k2](/packages/kmlaravel-laravel-geographical-calculator)[foowie/dependentselectbox

Selectbox whose options are depended on another selectbox. Library for Nette Framework

1027.8k](/packages/foowie-dependentselectbox)[thedmsgroup/mautic-extended-field-bundle

Extends custom fields for scalability and HIPAA/PCI compliance.

293.1k](/packages/thedmsgroup-mautic-extended-field-bundle)[christianessl/landmap-generation

Generate pixelated, random world maps in PHP.

173.6k](/packages/christianessl-landmap-generation)

PHPackages © 2026

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