We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f3e233 commit 5ea32dcCopy full SHA for 5ea32dc
ext/spl/examples/dualiterator.inc
@@ -12,7 +12,7 @@
12
/** @ingroup Examples
13
* @brief Synchronous iteration over two iterators
14
* @author Marcus Boerger
15
- * @version 1.1
+ * @version 1.2
16
*/
17
class DualIterator implements Iterator
18
{
@@ -174,6 +174,7 @@ class DualIterator implements Iterator
174
175
$it = new RecursiveDualIterator($lhs, $rhs,
176
self::CURRENT_0 | self::KEY_0);
177
+ $it = new RecursiveIteratorIterator($it);
178
}
179
else
180
@@ -187,7 +188,7 @@ class DualIterator implements Iterator
187
188
189
if ($identical)
190
- foreach(new RecursiveIteratorIterator($it) as $n)
191
+ foreach($it as $n)
192
193
if (!$it->areIdentical())
194
0 commit comments