### Description The following code: ```php <?php Dom\HTMLDocument::createFromString(<<<a <!DOCTYPE html> <b id="container"> a) ->getElementById('container') ->getElementsByClassName('') ->namedItem("here"); ``` Resulted in this output: ```sh php: /home/user/software/php-install/src/ext/dom/html_collection.c:58: dom_html_collection_named_item: Assertion `iter.candidate->type == XML_ELEMENT_NODE' failed. Aborted ``` ### PHP Version ```plain PHP 8.7.0-dev (cli) (built: Sep 23 2026 15:02:26) (NTS DEBUG) Copyright © The PHP Group and Contributors Zend Engine v4.7.0-dev, Copyright © Zend by Perforce with Zend OPcache v8.7.0-dev, Copyright ©, by Zend by Perforce ``` ### Operating System Ubuntu 24.04
Activity
Fix phpGH-23887: HTMLCollection::namedItem() mishandles the first child
Merge branch 'PHP-8.5' into PHP-8.6
Merge branch 'PHP-8.6'