1--TEST-- 2xml_parser_free - Test setting skip whitespace and invalid encoding type 3--CREDITS-- 4Mark Niebergall <mbniebergall@gmail.com> 5PHP TestFest 2017 - UPHPU 6--SKIPIF-- 7<?php 8if (!extension_loaded("xml")) { 9 print "skip - XML extension not loaded"; 10} 11?> 12--FILE-- 13<?php 14 15$xmlParser = xml_parser_create(); 16 17var_dump(xml_parser_set_option($xmlParser, XML_OPTION_SKIP_WHITE, 1)); 18 19try { 20 xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, 'Invalid Encoding'); 21} catch (ValueError $exception) { 22 echo $exception->getMessage() . "\n"; 23} 24 25?> 26--EXPECT-- 27bool(true) 28xml_parser_set_option(): Argument #3 ($value) is not a supported target encoding 29