-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for getting SKIP_TAGSTART and SKIP_WHITE options
When `XML_OPTION_SKIP_TAGSTART` and `XML_OPTION_SKIP_WHITE` had been introduced[1], it had been overlooked to also support them for `xml_parser_get_option()`. We catch up on that. [1] <http://git.php.net/?p=php-src.git;a=commit;h=b57dc275950b228f2399990471c4f22b7d154c6c>
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--TEST-- | ||
xml_parser_get_option() with XML_OPTION_SKIP_TAGSTART and XML_OPTION_SKIP_WHITE | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('xml')) die('skip xml extension not available'); | ||
?> | ||
--FILE-- | ||
<?php | ||
$parser = xml_parser_create(); | ||
echo "defaults:\n"; | ||
var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_TAGSTART)); | ||
var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_WHITE)); | ||
echo "setting:\n"; | ||
var_dump(xml_parser_set_option($parser, XML_OPTION_SKIP_TAGSTART, 7)); | ||
var_dump(xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1)); | ||
echo "getting:\n"; | ||
var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_TAGSTART)); | ||
var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_WHITE)); | ||
?> | ||
--EXPECT-- | ||
defaults: | ||
int(0) | ||
int(0) | ||
setting: | ||
bool(true) | ||
bool(true) | ||
getting: | ||
int(7) | ||
int(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters