Category
bug · AOT · DOM · Pillar Correctness · Attr::isId after loadXML DTD / xml:id
Problem
User-script AOT loadXML already indexes DTD ATTLIST … ID and xml:id for getElementById (#34696), but never stamps the Attr cache ID-bearing flag used by thin-AOT DOMAttr::isId() (#29884). Zend/VM return true; AOT returns false (assigned and chained).
Probed 2026-08-25 @ fc32a91ce6 — Zend 8.2 vs AOT (aot-smoke 8/8).
| Repro |
Zend / VM |
AOT |
<!ATTLIST c id ID #IMPLIED> + getAttributeNode('id')->isId() |
true |
false |
same, assigned local $a->isId() |
true |
false |
getElementById('t') |
element c |
element c (OK) |
xml:id="t" + getAttributeNode('xml:id')->isId() |
true |
false |
php-src reference
PHP implementation target
Repro
./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro/maintainer_gap_dom_getattributenode_isid_chain_after_setid.php
php bin/compile.php -o /tmp/isid test/repro/maintainer_gap_dom_getattributenode_isid_chain_after_setid.php && /tmp/isid'
Done when
Parent / peers
Category
bug· AOT · DOM · Pillar Correctness · Attr::isId after loadXML DTD / xml:idProblem
User-script AOT
loadXMLalready indexes DTDATTLIST … IDandxml:idforgetElementById(#34696), but never stamps the Attr cache ID-bearing flag used by thin-AOTDOMAttr::isId()(#29884). Zend/VM returntrue; AOT returnsfalse(assigned and chained).Probed 2026-08-25 @
fc32a91ce6— Zend 8.2 vs AOT (aot-smoke8/8).<!ATTLIST c id ID #IMPLIED>+getAttributeNode('id')->isId()truefalse$a->isId()truefalsegetElementById('t')cc(OK)xml:id="t"+getAttributeNode('xml:id')->isId()truefalsephp-src reference
ext/dom/attr.c—dom_attr_is_id_read/attrp->atype == XML_ATTRIBUTE_IDext/dom/document.c— load + xmlAddID from DTD / xml:idPHP implementation target
ext/dom/JitDomLoadXMLUserScript.phpregisterLiveElementIdFromAttrMap— after successful id-map register,DomUserScriptAttributeCacheLlvm::markIdBearingLiteral('', $attrName, true)(peerJitDomSetIdAttribute)Repro
Done when
isId()(assigned + chained)getElementByIdstill first-wins / live (AOT: loadXML DTD ID getElementById finds only first element — later IDs null + detached from tree (ext/dom/document.c) #34696)./script/aot-smoke.shstays 8/8./script/phpunit.sh --filter …greenParent / peers