1--TEST-- 2Unsetting properties 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8class MyElement extends DOMElement { 9 public int $myProp = 3; 10} 11 12$dom = new DOMDocument; 13$dom->registerNodeClass('DOMElement', 'MyElement'); 14$dom->loadXML('<root>foo</root>'); 15$root = $dom->documentElement; 16 17unset($root->myProp); 18try { 19 $root->myProp; 20} catch (Error $e) { 21 echo $e->getMessage(), "\n"; 22} 23try { 24 unset($root->textContent); 25} catch (Error $e) { 26 echo $e->getMessage(), "\n"; 27} 28 29?> 30--EXPECT-- 31Typed property MyElement::$myProp must not be accessed before initialization 32Cannot unset MyElement::$textContent 33