1--TEST--
2Delayed freeing processing instruction
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$doc = new DOMDocument;
8$pi = $doc->appendChild($doc->createElementNS('some:ns', 'container'))
9    ->appendChild($doc->createProcessingInstruction('hello', 'world'));
10echo $doc->saveXML(), "\n";
11$pi->parentNode->remove();
12echo $doc->saveXML(), "\n";
13var_dump($pi->parentNode);
14var_dump($pi->nodeValue);
15?>
16--EXPECT--
17<?xml version="1.0"?>
18<container xmlns="some:ns"><?hello world?></container>
19
20<?xml version="1.0"?>
21
22NULL
23string(5) "world"
24