1--TEST--
2SimpleXML and template content
3--EXTENSIONS--
4dom
5simplexml
6--SKIPIF--
7<?php
8if (!PHP_DEBUG) { die ("skip only for debug build"); }
9?>
10--FILE--
11<?php
12$dom = Dom\HTMLDocument::createFromString('<template>foo<template>nested</template></template>', LIBXML_NOERROR);
13$head = $dom->head;
14$head_sxe = simplexml_import_dom($head);
15var_dump($head_sxe);
16var_dump($dom->debugGetTemplateCount());
17unset($head_sxe->template);
18var_dump($head_sxe);
19var_dump($dom->debugGetTemplateCount());
20?>
21--EXPECTF--
22object(SimpleXMLElement)#%d (1) {
23  ["template"]=>
24  object(SimpleXMLElement)#%d (0) {
25  }
26}
27int(2)
28object(SimpleXMLElement)#%d (0) {
29}
30int(0)
31