Skip to content

Instantly share code, notes, and snippets.

@oqq
Last active November 8, 2016 10:10
Show Gist options
  • Save oqq/eef4d3a0e1188f2d8b0c8fa8bb1ee812 to your computer and use it in GitHub Desktop.
Save oqq/eef4d3a0e1188f2d8b0c8fa8bb1ee812 to your computer and use it in GitHub Desktop.
AppendIterator test case
<?php
$iterator1 = new \AppendIterator();
$iterator2 = new \AppendIterator();
$events = new \ArrayIterator(['event']);
$iterator1->append($events);
$iterator2->append($events);
// without this foreach, i will not hang
foreach ($iterator2 as $event) {
}
$iterator1->append(new \ArrayIterator());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment