Category
stdlib · php-src-strict
Problem
DOMText::splitText() is undefined on the VM, so splitting a text node at an offset fatals. Zend returns the tail fragment and shortens the original node.
| Repro |
Zend 8.2+ |
VM (2026-07-09) |
$text->splitText(2) on "hello" |
parent=he, tail=llo |
Error: Call to undefined method DOMText::splitText() |
php-src reference
PHP implementation target
ext/dom/ VM DOM wrappers — wire splitText on DOMText via existing DOMCharacterData / node mutation paths in PHP (ext/dom/VmDom*.php); no new C runtime logic
Repro
./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_dom_split_text.php'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_dom_split_text.php'
Done when
Category
stdlib· php-src-strictProblem
DOMText::splitText()is undefined on the VM, so splitting a text node at an offset fatals. Zend returns the tail fragment and shortens the original node.$text->splitText(2)on"hello"parent=he,tail=lloError: Call to undefined method DOMText::splitText()php-src reference
ext/dom/text.c—dom_text_split_text()ext/dom/characterdata.c— sharedCharacterDatamutation helpersPHP implementation target
ext/dom/VM DOM wrappers — wiresplitTextonDOMTextvia existingDOMCharacterData/ node mutation paths in PHP (ext/dom/VmDom*.php); no new C runtime logicRepro
Done when
DOMText::splitText(int $offset)returns tailDOMTextand truncates parent per Zend.phptguard undertest/compliance/cases/dom/