Commit 2290177565d for php

commit 2290177565d8ded70f8b1c1677f24e1b2d6b5f24
Merge: e91a8435995 c03d1aad686
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Mon Oct 5 07:13:43 2026 -0400

    Merge branch 'PHP-8.5' into PHP-8.6

    * PHP-8.5:
      ext/dom: Restore the XPath context after a reentrant evaluation

diff --cc NEWS
index bc63b84709c,6d537ffe99b..30869309af8
--- a/NEWS
+++ b/NEWS
@@@ -39,6 -23,29 +39,11 @@@ PH
    . Fixed System V shared memory emulation for Windows attaching segments past
      the end of their mapping. (Ilia Alshanetsky)

 -- CLI
 -  . Fix GH-22567 (Windows ZTS CLI SAPI should refresh its TSRMLS cache during
 -    request activation). (matyhtf)
 -  . Fixed bug GH-23764 (Built-in server leaks a file descriptor on every HEAD
 -    request for a static file). (jakubskopal)
 -  . Fixed the built-in server truncating an error page and leaking its
 -    unsent part after a partial socket write. (Ilia Alshanetsky)
 -
+ - DOM:
 -  . Fixed use-after-free when re-constructing a DOMXPath whose php:function
 -    registrations are freed while still reachable from the cycle collector.
 -    (Ilia Alshanetsky)
 -  . Fixed Dom\HTMLDocument::getElementById() not finding ids of SVG and
 -    MathML elements. (Ilia Alshanetsky)
 -  . Fixed Dom\HTMLDocument giving attributes the namespace of their element
 -    when a fragment is parsed with an xlink, xml or xmlns context element.
 -    (Ilia Alshanetsky)
 -  . Fixed bug GH-23887 (Dom\HTMLCollection::namedItem() assertion failure,
 -    hang, or missed first element). (Lazizbek Ergashev)
+   . Fixed DOMXPath and Dom\XPath losing the context node and in-scope
+     namespaces of an evaluation after a php:function() callback evaluated
+     another expression on the same object. (Ilia Alshanetsky)
+
  - FFI:
    . Fixed crashes with FFI callbacks created from __call() trampolines
      and array callables whose object is released. (Ilia Alshanetsky)