You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: DOMDocument::getElementById() missing — ID lookup fatal (ext/dom/php_dom.c) #14378
DOMDocument::getElementById(string $elementId): ?DOMElement is part of the ext/dom API in php-src. VM fatals with undefined method DOMDocument::getElementById(); Zend PHP 8.2 in Docker runs the method (returns null when no DTD/id map, or the matching element when configured).
ext/dom/VmDom.php + DOM document wrappers (not new C runtime logic)
Wire libxml ID table when validateOnParse/DTD present; return null when unknown id (Zend parity)
Repro
./script/docker-exec.sh -- php bin/vm.php test/repro/maintainer_gap_dom_get_element_by_id.php
# VM: undefined method DOMDocument::getElementById()# Zend 8.2: ok (prints null or ok depending on id map)
Expected (php-src-strict)
Method registered on DOMDocument
Known id in loaded document → DOMElement; unknown → null
No fatal for method dispatch
Done when
Repro green on VM
ID lookup matches Zend for DTD and non-DTD documents
Activity
Implement DOMDocument::getElementById() with DTD ID indexing (#14378). (
PurHur commentedon Jul 1, 2026
Merged via #14384.
Verification