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