xref: /php-src/ext/dom/tests/gh14698.phpt (revision 1d905442)
1--TEST--
2GH-14698 crash on DOM node dereference
3--EXTENSIONS--
4dom
5simplexml
6--CREDITS--
7YuanchengJiang
8--FILE--
9<?php
10  $dom = new DOMDocument;
11  $dom->loadHTML('<span title="y">x</span><span title="z">x</span>');
12  $html = simplexml_import_dom($dom);
13  foreach ($html->body->span as $obj) {
14  }
15  $script1_dataflow = $html;
16  $array = ['foo'];
17  foreach ($array as $key => &$value) {
18    unset($script1_dataflow[$key]);
19  }
20  echo "DONE";
21?>
22--EXPECTF--
23DONE
24