1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
--TEST--
XMLReader: setParserProperty Error
--EXTENSIONS--
xmlreader
--FILE--
<?php
$xml = '<?xml version="1.0" encoding="UTF-8"?><books><book>new book</book></books>';
$invalidProperty = -1;
$reader = new XMLReader();
$reader->XML($xml);
try {
$reader->setParserProperty(-1, true);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
$reader->close();
?>
--EXPECT--
XMLReader::setParserProperty(): Argument #1 ($property) must be a valid parser property
|