PHP Classes

File: docs/compatibility.rst

Recommend this page to a friend!
  Packages of A. B. M. Mahmudul Hasan   UID (UUID, ULID, Snowflake, Sonyflake, Nano, CUID, KSUID, XID, TBSL)   docs/compatibility.rst   Download  
File: docs/compatibility.rst
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: UID (UUID, ULID, Snowflake, Sonyflake, Nano, CUID, KSUID, XID, TBSL)
Generate, parse, validate unique identifiers
Author: By
Last change:
Date: 8 days ago
Size: 1,419 bytes
 

Contents

Class file image Download
Compatibility Matrix ==================== UUID Support ------------ - ``v1``, ``v3``, ``v4``, ``v5``: RFC 4122 / RFC 9562 compatible layouts. - ``v6``, ``v7``: RFC 9562 time-ordered UUIDs. - ``v8``: custom payload strategy inside UUID v8 envelope. - ``guid()``: Microsoft-compatible GUID text formatting helper. Non-UUID Families ----------------- - ULID: Crockford Base32 ULID with monotonic and random modes. - Snowflake: 64-bit Twitter-style ID (41/5/5/12). - Sonyflake: 64-bit Sonyflake-style ID (39/16/8). - TBSL: project-specific time-based sortable hex identifier. - NanoID and CUID2: URL-safe random IDs. - KSUID and XID: sortable short ID families. Algorithm Interface ------------------- ``NanoID``, ``CUID2``, ``KSUID``, and ``XID`` implement ``Infocyph\\UID\\Contracts\\IdAlgorithmInterface`` with: - ``generate()`` - ``isValid()`` - ``parse()`` Binary and Alternate Encodings ------------------------------ - UUID / ULID / TBSL: ``toBytes()`` / ``fromBytes()``. - UUID / ULID / Snowflake / Sonyflake / TBSL: ``toBase()`` / ``fromBase()``. - KSUID / XID: ``toBytes()`` / ``fromBytes()``. - Shared byte-level encoder: ``Infocyph\\UID\\Support\\BaseEncoder``. - Supported bases: ``16``, ``32``, ``36``, ``58``, ``62``. Runtime Requirements -------------------- - Minimum PHP: ``8.2`` - Required extension: ``ext-bcmath`` - Optional sequence backends: filesystem, in-memory, PSR-16 cache, callback.