Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternalIterator->next() implicitly calls rewind - explicitly initialize and mark as rewound instead #184

Open
TysonAndre opened this issue Mar 10, 2022 · 0 comments

Comments

@TysonAndre
Copy link
Owner

TysonAndre commented Mar 10, 2022

zend_internal_iterator_ensure_rewound is static and so is the definition of zend_internal_iterator

This is counterproductive when ensuring predictable iteration behavior when getIterator does ensure the iterator is rewound

  1. Ensure iterator is initialized as if it were rewound
  2. Work on exposing an api to rewind these in php-src

Propose a new method zend_create_rewound_internal_iterator_zval for use in getIterator(): InternalIterator

@TysonAndre TysonAndre changed the title InternalIterator->next() implicitly calls rewind - explicitly initialize and call rewind instead InternalIterator->next() implicitly calls rewind - explicitly initialize and mark as rewound instead Mar 10, 2022
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

No branches or pull requests

1 participant