From 890021e2be5862cae4aae0bb71a0a80515d992de Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Oct 2025 10:46:33 +0200 Subject: [PATCH 1/3] SimpleXML: Use RETURN_STRINGL_FAST() for key() (#20127) We do the same for getName() because names are often one char. --- ext/simplexml/simplexml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 58d7157e91d32..82165afd353db 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2028,7 +2028,7 @@ PHP_METHOD(SimpleXMLElement, key) } curnode = intern->node->node; - RETURN_STRINGL((char*)curnode->name, xmlStrlen(curnode->name)); + RETURN_STRINGL_FAST((char*)curnode->name, xmlStrlen(curnode->name)); } /* }}} */ From a572b1015b0f57f80e0af0775525c8ae397cdba0 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Oct 2025 10:46:44 +0200 Subject: [PATCH 2/3] xml: Switch to safe option setting API (#20128) --- ext/xml/compat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/xml/compat.c b/ext/xml/compat.c index ea72a958006e2..21184be87182b 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -452,8 +452,12 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m return NULL; } +#if LIBXML_VERSION >= 21300 + xmlCtxtSetOptions(parser->parser, XML_PARSE_OLDSAX | XML_PARSE_NOENT); +#else php_libxml_sanitize_parse_ctxt_options(parser->parser); xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX | XML_PARSE_NOENT); +#endif parser->parser->wellFormed = 0; if (sep != NULL) { From c3b66cdb449d0e80a960e80c7961fdd3418bda92 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:27:24 +0200 Subject: [PATCH 3/3] [ci skip] Fix test formatting --- ext/intl/tests/formatter/currencies.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/tests/formatter/currencies.phpt b/ext/intl/tests/formatter/currencies.phpt index 01c64a0480d37..1293283e7fc2b 100644 --- a/ext/intl/tests/formatter/currencies.phpt +++ b/ext/intl/tests/formatter/currencies.phpt @@ -1,6 +1,6 @@ --TEST-- NumberFormatter: currency formatting -----DESCRIPTION-- +--DESCRIPTION-- Tests NumberFormatter with various currenct-related formatters. --EXTENSIONS-- intl