1--TEST--
2Delayed freeing notation declaration
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$doc = new DOMDocument;
8$doc->loadXML(<<<'XML'
9<?xml version="1.0"?>
10<!DOCTYPE books [
11<!NOTATION myNotation SYSTEM "test.dtd">
12]>
13<container/>
14XML);
15$notation = $doc->doctype->notations[0];
16var_dump($notation->nodeName, $notation->publicId, $notation->systemId);
17$doc->removeChild($doc->doctype);
18var_dump($notation->nodeName, $notation->publicId, $notation->systemId);
19unset($doc);
20var_dump($notation->nodeName, $notation->publicId, $notation->systemId);
21?>
22--EXPECT--
23string(10) "myNotation"
24string(0) ""
25string(8) "test.dtd"
26string(10) "myNotation"
27string(0) ""
28string(8) "test.dtd"
29string(10) "myNotation"
30string(0) ""
31string(8) "test.dtd"
32