heterogeny/heterogeny-php

Maintainers

Package info

github.com/heterogeny/heterogeny-php

pkg:composer/heterogeny/heterogeny-php

Statistics

Installs: 3 895

Dependents: 1

Suggesters: 0

Stars: 6

Open Issues: 0

v0.0.12 2019-08-28 01:45 UTC

This package is auto-updated.

Last update: 2026-03-28 16:35:33 UTC


README

Experimental

Heterogenize PHP's data structures, like array that is split into Seq, Dict and Tuple.

  • Seq is a no-key array, setting keys that is not an integer will result in an Exception, every Seq will be JSON encoded as [];

  • Dict is a keyed array, whether key is string or not, every Dict will be JSON encoded as {};

  • Tuple is just like a Seq, maybe in the future helpers will be added to Tuple.

Also supplying some helpers for JSON encoding/decoding without headaches on checking whether something is array or array with keys.

Performance is not guaranteed at this point.