Skip to content

Stdlib: strip_tags() VM, JIT, and AOT#320

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-strip-tags
May 19, 2026
Merged

Stdlib: strip_tags() VM, JIT, and AOT#320
PurHur merged 1 commit into
masterfrom
agent/stdlib-strip-tags

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 19, 2026

Summary

  • Implements strip_tags() in ext/standard/ with VmString logic (allow-list, HTML comments, PHP tags).
  • JIT/AOT: compile-time constant folding for literal strings; runtime path via __compiler_strip_tags in AOT C runtime.
  • Adds VM/JIT/AOT PHPT coverage and updates capability matrix.

Test plan

  • php bin/vm.php -r 'echo strip_tags("<script>x</script>");'x
  • JIT compile-time path for literal strings
  • AOT binary via bin/compile.php for test/fixtures/aot/cases/strip_tags.phpt
  • php script/capability-matrix.php --check

Closes #299

Made with Cursor

Implements HTML tag stripping with allow-lists, comment/PHP tag removal,
LLVM compile-time folding, and a C runtime helper for dynamic strings.
Closes #299.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit fc9a6fb into master May 19, 2026
1 check failed
@PurHur PurHur deleted the agent/stdlib-strip-tags branch May 19, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: strip_tags() — allowed-tags subset for HTML sanitization

1 participant