1--TEST-- 2Virtual property unset tests 3--EXTENSIONS-- 4xmlreader 5--FILE-- 6<?php 7 8class MyXMLReader extends XMLReader 9{ 10 public int $x; 11} 12 13$reader = new MyXMLReader(); 14 15try { 16 unset($reader->attributeCount); 17} catch (Error $e) { 18 echo $e->getMessage() . "\n"; 19} 20 21try { 22 unset($reader->baseURI); 23} catch (Error $e) { 24 echo $e->getMessage() . "\n"; 25} 26 27try { 28 unset($reader->depth); 29} catch (Error $e) { 30 echo $e->getMessage() . "\n"; 31} 32 33try { 34 unset($reader->hasAttributes); 35} catch (Error $e) { 36 echo $e->getMessage() . "\n"; 37} 38 39try { 40 unset($reader->hasValue); 41} catch (Error $e) { 42 echo $e->getMessage() . "\n"; 43} 44 45unset($reader->x); 46var_dump(isset($reader->x)); 47 48?> 49--EXPECT-- 50Cannot unset MyXMLReader::$attributeCount 51Cannot unset MyXMLReader::$baseURI 52Cannot unset MyXMLReader::$depth 53Cannot unset MyXMLReader::$hasAttributes 54Cannot unset MyXMLReader::$hasValue 55bool(false) 56