You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bin/serve.php uses native PHP ob_start() for the host wrapper only. Compiled PHP has no output buffering; every echo goes straight to stdout/CGI. MiniWebApp (#67) and template includes (#54, #275extract) need a capture buffer.
Goal
Minimal OB stack (single level is enough for v1) on VM; document JIT/AOT gap until echo hooks exist in LLVM path.
Implementation hints
VM context (lib/VM.php or dedicated OutputBuffer.php):
Stack of growable strings (or list of chunks)
ob_start() pushes buffer; TYPE_ECHO / TYPE_PRINT append when active
ob_get_clean() returns string and pops; ob_end_flush() echoes buffer and pops
ob_get_level() returns stack depth
Nested ob_start (v2): second level optional; v1 may error on double-start like Zend
Problem
Layout/template patterns wrap page body:
bin/serve.phpuses native PHPob_start()for the host wrapper only. Compiled PHP has no output buffering; everyechogoes straight to stdout/CGI. MiniWebApp (#67) and template includes (#54, #275extract) need a capture buffer.Goal
Minimal OB stack (single level is enough for v1) on VM; document JIT/AOT gap until echo hooks exist in LLVM path.
Implementation hints
lib/VM.phpor dedicatedOutputBuffer.php):ob_start()pushes buffer;TYPE_ECHO/TYPE_PRINTappend when activeob_get_clean()returns string and pops;ob_end_flush()echoes buffer and popsob_get_level()returns stack depthincludeinside OB (Language: include/require in JIT and AOT (multi-file applications) #54) must route echoes into active bufferbin/serve.phpwrapper (host PHP) — compiled OB is separate from hostob_start()in serve.phpdocs/capabilities.md; lint registry flagsob_startuntil JIT landsFiles
ext/standard/ob_start.php(etc.)lib/VM.phpob_get_level() > 0test/compliance/cases/stdlib/ob_start.phptlib/Lint/UnsupportedRegistry.phpScope
ob_start,ob_get_clean,ob_end_flush,ob_get_levelAcceptance criteria
Verification (local / Docker only)
No
.github/workflows/*changes.Dependencies
Links
bin/serve.php(host OB only today)