Category
Regression: · php-src-strict · ext/dom AOT user-script bridge
Problem
DOMXPath or/and parity was fixed for VM/JIT in #32050, but AOT user-script compile still aborts for the same expressions. In this workspace, targeted AOT tests fail because DOMXPath::evaluate() rejects or/and as unsupported and exits before running the fixture.
Probed 2026-08-18 via docker wrapper.
| Repro |
Zend 8.2+ |
AOT (2026-08-18) |
evaluate('true() or false()') in dom_xpath_or_and.phpt |
true |
compile abort: unsupported expression class |
evaluate('1 or 0') |
true |
compile abort |
count(//a[@id or @class]) |
2.0 |
compile abort before runtime |
php-src reference
PHP implementation target
ext/dom/JitDomXPathEvaluateUserScript.php — extend user-script AOT bridge to accept/compile or/and expression shapes already supported by VM/JIT path
ext/dom/JitDomXPathExpr.php (if needed) — share boolean-expression acceptance logic; no new runtime/*.c
Repro
./script/phpunit.sh --filter 'DomXpathOrAndAotTest|AotTest::testCases.*dom_xpath_or_and'
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./phpc build -o /tmp/dom_or_and test/repro/maintainer_gap_dom_xpath_or_and.php && /tmp/dom_or_and'
Done when
Category
Regression:· php-src-strict · ext/dom AOT user-script bridgeProblem
DOMXPath or/andparity was fixed for VM/JIT in #32050, but AOT user-script compile still aborts for the same expressions. In this workspace, targeted AOT tests fail becauseDOMXPath::evaluate()rejectsor/andas unsupported and exits before running the fixture.Probed 2026-08-18 via docker wrapper.
evaluate('true() or false()')indom_xpath_or_and.phpttrueevaluate('1 or 0')truecount(//a[@id or @class])2.0php-src reference
ext/dom/xpath.c—DOMXPath::query/evaluatevia libxml XPath evaluator (supports XPath 1.0 boolean operators)PHP implementation target
ext/dom/JitDomXPathEvaluateUserScript.php— extend user-script AOT bridge to accept/compileor/andexpression shapes already supported by VM/JIT pathext/dom/JitDomXPathExpr.php(if needed) — share boolean-expression acceptance logic; no newruntime/*.cRepro
Done when
dom_xpath_or_andAOT fixture compiles and matches Zend outputs (or=2,and=1,not_id=2, boolean evaluates)DomXpathOrAndAotTestand existing VM/JIT tests)