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--EXTENSIONS--
7xml
8--FILE--
9<?php
10
11$xmlParser = xml_parser_create();
12
13var_dump(xml_parser_set_option($xmlParser, XML_OPTION_SKIP_WHITE, 1));
14
15try {
16    xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, 'Invalid Encoding');
17} catch (ValueError $exception) {
18    echo $exception->getMessage() . "\n";
19}
20
21?>
22--EXPECT--
23bool(true)
24xml_parser_set_option(): Argument #3 ($value) is not a supported target encoding
25