php-src/ext/xml/tests/xml_parser_set_option_nonexistent_option.phpt
George Peter Banyard 81e59c6497
Improve handling of XML options
Mark boolean options as such
Warn on invalid types
Stubs info

Closes GH-10675
2023-02-26 14:34:39 +00:00

18 lines
348 B
PHP

--TEST--
xml_parser_set_option(): Non-existent option
--EXTENSIONS--
xml
--FILE--
<?php
$xmlParser = xml_parser_create();
try {
xml_parser_set_option($xmlParser, 42, 1);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
xml_parser_set_option(): Argument #2 ($option) must be a XML_OPTION_* constant