1--TEST--
2Request #68325 (XML_OPTION_PARSE_HUGE cannot be set for xml_parser_create - setting during parsing)
3--EXTENSIONS--
4xml
5--SKIPIF--
6<?php
7if (!defined("LIBXML_VERSION")) die('skip this is a libxml2 test');
8?>
9--FILE--
10<?php
11
12$parser = xml_parser_create();
13xml_set_element_handler($parser, function($parser, $data) {
14    xml_parser_set_option($parser, XML_OPTION_PARSE_HUGE, true);
15}, function($parser, $data) {
16});
17xml_parse($parser, "<foo/>", true);
18
19?>
20--EXPECTF--
21Fatal error: Uncaught Error: Cannot change option XML_OPTION_PARSE_HUGE while parsing in %s:%d
22Stack trace:
23#0 %s(%d): xml_parser_set_option(Object(XMLParser), 5, true)
24#1 [internal function]: {closure:%s:%d}(Object(XMLParser), 'FOO', Array)
25#2 %s(%d): xml_parse(Object(XMLParser), '<foo/>', true)
26#3 {main}
27  thrown in %s on line %d
28