XAO SPECIFICATION HANDBOOK

Xao Framework Specification · Release 1.0.0-dev

PHC Runtime & Compatibility

Running Xao on PHC in isolate and worker modes, sandbox defaults, worker-safe autoloading, and P00–P05 compatibility findings.

Document Slug
phc-runtime
Section
Operations & Runtime
Audience
Operators and PHC contributors
Status
stable
Source File
content/phc-runtime.md
XML Contract
/xml/phc-runtime

Xao is verified continuously against PHC (phc check, phc run, and phc serve in both isolate and worker modes) alongside PHP 8.4 parity checks.

Summary of PHC Capabilities & Workarounds

AreaStatusNotes
Worker-mode closure autoloaderWorkaround in placesrc/autoload.php registers a named global function xao_autoload() guarded by function_exists() rather than an anonymous closure
DOMDocument & namespace-aware DOMResolved in PHC P11 (xot)Supports createElementNS, getElementsByTagNameNS, importNode, C14N
DOMXPath queries & predicatesResolved in PHC P11 (xee-xpath)Supports query(), evaluate(), registerNamespace(), axes, predicates
xml:space="preserve" text nodesResolved in PHC (xml.rs)Preserves leading/trailing spaces inside <text xml:space="preserve">
Native XSLT 3.0 (xsl3)Default build (P10)XSLTProcessor in-process via pure-Rust xee-xslt/xot
CommonMark XML 1.0 (markdown-xml)Default build (P12)phc_markdown_to_xml() / phc_markdown_to_dom() via comrak
LIBXML_NONET constantGuarded in DomDocChecked with defined('LIBXML_NONET') at runtime

Sandbox Defaults (phc.toml)

PHC executes request handlers inside a deny-by-default sandbox:

xee-xslt Authoring Notes

When authoring stylesheets for PhcNativeXsltDriver (xee-xslt):

Complete Handbook Index