Skip to content

ArrayObject getIterator() + ArrayAccess (#10639) - #10773

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-arrayobject-iterator-batch
Jun 23, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/stdlib-arrayobject-iterator-batch

Conversation

@PurHur

@PurHur PurHur commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement ArrayObject::getIterator() by constructing the configured iterator class over a copy of internal storage.
  • Add offsetGet / offsetSet / offsetExists / offsetUnset backed by SplArrayStorage.
  • Add compliance PHPT covering iterator foreach and bracket access.

Test plan

  • vendor/bin/phpunit --filter arrayobject test/compliance/VMTest.php
  • Manual: getIterator() returns ArrayIterator and iterates entries

Made with Cursor

Wire getIterator to SplArrayStorage-backed ArrayIterator instances and
implement offsetGet/Set/Exists/Unset on the internal hash table.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 8d4cc53 into master Jun 23, 2026
@PurHur
PurHur deleted the agent/stdlib-arrayobject-iterator-batch branch June 23, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant