Category
stdlib
Problem
#3164 / #3447 delivered VM highlight_string(), highlight_file(), and show_source() by delegating to the host Zend tokenizer (ext/standard/VmHighlight.php). docs/capabilities.md marks them JIT = yes at register level, but highlight_string.php call() throws highlight_string() is VM only in this compiler build — bin/jit.php / AOT cannot run debug/highlight snippets without VM fallback.
php-src reference
Repro
<?php
$html = highlight_string('<?php echo 1; ?>', true);
echo str_contains($html, '<code') ? "ok\n" : "fail\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php repro.php # ok today
php bin/jit.php repro.php # LogicException VM-only (or fallback)
'
Existing compliance: test/compliance/cases/stdlib/highlight_string.phpt (VM); extend with _jit.phpt / AOT fixture.
Scope (this repo)
| Layer |
Files |
| VM |
ext/standard/VmHighlight.php — keep host delegate for phase 1 |
| JIT/AOT |
ext/standard/highlight_string.php, highlight_file.php, show_source.php — call() lowering OR link runtime C port of php_highlight.h subset |
| Runtime |
lib/AOT/runtime/ — optional phpc_highlight_string helper (no full Zend link) |
| Tests |
test/compliance/cases/stdlib/highlight_string_jit.phpt, test/fixtures/aot/cases/highlight_string.phpt |
| Matrix |
script/capability-matrix.php — align JIT notes with reality |
Done when
Links
Category
stdlibProblem
#3164 / #3447 delivered VM
highlight_string(),highlight_file(), andshow_source()by delegating to the host Zend tokenizer (ext/standard/VmHighlight.php).docs/capabilities.mdmarks them JIT = yes at register level, buthighlight_string.phpcall()throwshighlight_string() is VM only in this compiler build—bin/jit.php/ AOT cannot run debug/highlight snippets without VM fallback.php-src reference
ext/standard/url.c—PHP_FUNCTION(highlight_string),highlight_file,show_sourceext/standard/php_highlight.h— shared highlighterRepro
Existing compliance:
test/compliance/cases/stdlib/highlight_string.phpt(VM); extend with_jit.phpt/ AOT fixture.Scope (this repo)
ext/standard/VmHighlight.php— keep host delegate for phase 1ext/standard/highlight_string.php,highlight_file.php,show_source.php—call()lowering OR link runtime C port ofphp_highlight.hsubsetlib/AOT/runtime/— optionalphpc_highlight_stringhelper (no full Zend link)test/compliance/cases/stdlib/highlight_string_jit.phpt,test/fixtures/aot/cases/highlight_string.phptscript/capability-matrix.php— align JIT notes with realityDone when
bin/jit.phprepro printsokwithout VM-only LogicException<codecall()throws)./script/ci-fast.sh --filter highlightgreenLinks