1--TEST--
2Test xml_set_notation_decl_handler function : basic
3--EXTENSIONS--
4xml
5--FILE--
6<?php
7echo "Simple testcase for xml_parser_get_option() function\n";
8
9$parser = xml_parser_create_ns();
10
11var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
12var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
13
14var_dump(xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 1));
15var_dump(xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"));
16
17var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
18var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
19
20var_dump(xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0));
21var_dump(xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"));
22
23var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
24var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
25
26var_dump(xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "US-ASCII"));
27var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
28
29xml_parser_free( $parser );
30
31echo "Done\n";
32?>
33--EXPECT--
34Simple testcase for xml_parser_get_option() function
35int(1)
36string(5) "UTF-8"
37bool(true)
38bool(true)
39int(1)
40string(10) "ISO-8859-1"
41bool(true)
42bool(true)
43int(0)
44string(5) "UTF-8"
45bool(true)
46string(8) "US-ASCII"
47Done
48