xref: /PHP-8.3/ext/spl/tests/bug81587.phpt (revision 4b9fbc66)
1--TEST--
2Bug #81587: MultipleIterator Segmentation fault w/ SimpleXMLElement attached
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7$mi = new MultipleIterator();
8$mi->attachIterator(new SimpleXMLElement('<x><y/></x>'));
9foreach ($mi as $v) {
10    var_dump($v);
11}
12?>
13--EXPECT--
14array(1) {
15  [0]=>
16  object(SimpleXMLElement)#4 (0) {
17  }
18}
19