Problem
MiniWebApp templates (#67, #246) and comment fields need a simple way to strip HTML while keeping a whitelist of tags. Today only htmlspecialchars() is reliable in AOT (#124); apps often call strip_tags($html, '<p><br>') on Zend.
Goal
Implement strip_tags(string $str, ?string $allowed_tags = null) in VM with a documented subset (no full HTML5 parser). JIT/AOT parity optional for v1 if tracked as follow-up.
Scope
Acceptance criteria
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
php bin/vm.php -r 'echo strip_tags("<b>x</b><i>y</i>", "<b>");'
Prints xy (or documented equivalent).
Verification (local / Docker only)
./script/ci-local.sh --filter strip_tags
No GitHub Actions required.
Dependencies
Links
Problem
MiniWebApp templates (#67, #246) and comment fields need a simple way to strip HTML while keeping a whitelist of tags. Today only
htmlspecialchars()is reliable in AOT (#124); apps often callstrip_tags($html, '<p><br>')on Zend.Goal
Implement
strip_tags(string $str, ?string $allowed_tags = null)in VM with a documented subset (no full HTML5 parser). JIT/AOT parity optional for v1 if tracked as follow-up.Scope
ext/standard/(or existing string module)'<p><a><br>'docs/capabilities.mdviascript/capability-matrix.phpUnsupportedRegistryuntil implemented (if lint hits call sites)Acceptance criteria
Prints
xy(or documented equivalent).Verification (local / Docker only)
No GitHub Actions required.
Dependencies
htmlspecialchars(escape vs strip)Links
docs/capabilities.md, 🗺️ ROADMAP: Compile a small PHP web application (living document) #78 ROADMAP Phase 4htmlspecialcharsonly; strip_tags for CMS-style fields)