Skip to content

feat: support count($matrix) via ObjectCountElementsInterface #7

Description

@lisachenko

Implement ObjectCountElementsInterface::__count() returning the row count so count($matrix) works natively.

Per the z-engine dev-master contract, the class must also implement \Countable — z-engine's debug builds verify the count() arginfo — so both should be added together; the engine-level handler still wins at dispatch time.

Follow-up idea once this lands: a dedicated size(): array{int, int} helper for [rows, columns].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions