PHPackages                             ale/string-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. ale/string-array

ActiveLibrary

ale/string-array
================

010PHP

Since Apr 12Pushed 10y ago1 watchersCompare

[ Source](https://github.com/alanevans/string-array)[ Packagist](https://packagist.org/packages/ale/string-array)[ RSS](/packages/ale-string-array/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

string-array
============

[](#string-array)

[![Build Status](https://camo.githubusercontent.com/579786557e52bbc20f5d7b3ec642c24daee96677550560b1d371fbbc7ad6d98e/68747470733a2f2f7472617669732d63692e6f72672f616c616e6576616e732f737472696e672d61727261792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alanevans/string-array)[![Code Coverage](https://camo.githubusercontent.com/547c8f21fcc1f849cc234182c6fcb1044453c5928ba66b77f6fa8ff81ff8e0b1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c616e6576616e732f737472696e672d61727261792f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alanevans/string-array/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1845ae889248bc56a4668c2a8f3f96bc256e33b466b3baf1afdce0b3ff4fb657/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c616e6576616e732f737472696e672d61727261792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alanevans/string-array/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/314f6f1cf6c6252c3767d768a0f2fca4c6cc14655cae3da292ccac26423dfcf5/68747470733a2f2f706f7365722e707567782e6f72672f616c652f737472696e672d61727261792f762f737461626c652e737667)](https://packagist.org/packages/ale/string-array)[![Total Downloads](https://camo.githubusercontent.com/38e434b0fbd671ae68c14c99f33ffda716316a86248e62925347f5207ad08f92/68747470733a2f2f706f7365722e707567782e6f72672f616c652f737472696e672d61727261792f646f776e6c6f6164732e737667)](https://packagist.org/packages/ale/string-array)[![License](https://camo.githubusercontent.com/c22b45bdf3541d981044e27f469acb66858e0651d7208017f106934841f062fb/68747470733a2f2f706f7365722e707567782e6f72672f616c652f737472696e672d61727261792f6c6963656e73652e737667)](https://packagist.org/packages/ale/string-array)

This is an experimental library that intends to provide access to a C-like array within PHP. I cannot say whether this is a good idea or not, it mainly depends on your use case.

The current implementation uses a PHP string to avoid the memory overhead of using PHP's native hash table of Zvals to implement an array of arrays. This sacrifices speed for memory.

For even more (and slower) memory, you could consider shifting parts of the string off into files.

As an informal example, a 10000x1000 StringArray (10,000,000 data cells) takes about 40MB and takes about 10s to populate on an ok-ish laptop. The same in nested PHP arrays can be done in about half the time, but takes 1.4GB. I can easily test a StringArray of 10000x10000, which takes about 400MB, but it becomes prohibitive to test that size of array with native PHP arrays.

The question might well be "what possible use case requires that much memory but can afford to take that much time?" Well, I leave that up to you.

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

[](#installation)

string-array can be installed with [Composer](http://getcomposer.org)by adding it as a dependency to your project's composer.json file.

```
{
    "require": {
        "ale/string-array": "*"
    }
}
```

Please refer to [Composer's documentation](https://github.com/composer/composer/blob/master/doc/00-intro.md#introduction)for more detailed installation and usage instructions.

Usage
-----

[](#usage)

@todo

TODO
----

[](#todo)

I'm not sure when any of these will get done.

- Testing
- Currently, only 32-bit ints are handled. More types should be possible, chars would be super easy.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/420854307641588fd7031b86f7664f24434bc9dc99fd4538648989d6adfbb114?d=identicon)[alanevans](/maintainers/alanevans)

### Embed Badge

![Health badge](/badges/ale-string-array/health.svg)

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

PHPackages © 2026

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