heterogeny/heterogeny-php

Installs: 3 699

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 1

Forks: 2

Open Issues: 0

pkg:composer/heterogeny/heterogeny-php

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

This package is auto-updated.

Last update: 2025-09-28 15:06:53 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.