1--TEST--
2Read $ownerElement with null parent.
3--CREDITS--
4Travis Pew
5# TestFest Atlanta 2009-05-14
6--EXTENSIONS--
7dom
8--FILE--
9<?php
10
11$document = new DOMDocument;
12$root = $document->createElement('root');
13$document->appendChild($root);
14$attr = $root->setAttribute('category', 'books');
15$document->removeChild($root);
16$root = null;
17try {
18    var_dump($attr->ownerElement);
19} catch (\Error $e) {
20    echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL;
21}
22?>
23--EXPECT--
24Error: Couldn't fetch DOMAttr. Node no longer exists
25