j45l/abstract-data-structures-php

Abstract data structures for PHP

Installs: 48

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/j45l/abstract-data-structures-php

4.0.4 2023-05-23 04:33 UTC

This package is auto-updated.

Last update: 2025-10-23 09:41:31 UTC


README

Immutable data structures

Persistent data structured, not optimized for big collections/arrays

All collection are typed, extend from the base type, set the allowed type by overriding abstract public function type(): string;, return must the desired type classname.

When a getter operation would produce a mutation, a two elements array is returned, the first element would be the modified collection, and the second one the got element.

$queue = Queue::fromArray([1, 2]);

Classes