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

Iterator from Rust #308

Open
khaf opened this issue Jan 5, 2024 · 0 comments
Open

Iterator from Rust #308

khaf opened this issue Jan 5, 2024 · 0 comments

Comments

@khaf
Copy link

khaf commented Jan 5, 2024

Is there an example available to show how to implement an iterator for a Rust object that would work in the PHP side using foreach? Just naively implementing the Iterator interface didn't work, since PHP does not know about it. Any pointers would be appreciated.

Basically, I need this to work for my Rust object:

foreach($records as $key => $rec) {
...
}
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