Skip to content

feat: iterate rows with foreach ($matrix as $row) via ObjectGetIteratorInterface #8

Description

@lisachenko

z-engine dev-master bridges the engine's get_iterator handler to userland iterators. Implementing ObjectGetIteratorInterface::__getIterator() returning an iterator over rows would make foreach ($matrix as $i => $row) work without implementing Traversable on the class.

Contract notes from z-engine: by-reference iteration is rejected by the bridge, and iterator methods must not throw across the FFI boundary (errors surface as E_USER_WARNING and iteration terminates) — keep the iterator allocation-only over the already-validated internal array.

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