Category
stdlib · php-src-strict · regression · refs #1492
Problem
When an output buffer is active (ob_start()), Zend system() and passthru() echo child process stdout into that buffer and return the last line (system() only). This compiler returns the last line for system() but leaves the active buffer empty; passthru() buffer is also empty.
Verified 2026-06-28 — repro prints system_ob_ok=1 / passthru_ob_ok=1 on Zend vs 0 on VM.
php-src reference
Repro
test/repro/maintainer_gap_system_passthru_ob.php
php test/repro/maintainer_gap_system_passthru_ob.php
php bin/vm.php test/repro/maintainer_gap_system_passthru_ob.php
Implementation hints (PHP-in-PHP)
Done when
Related
Category
stdlib· php-src-strict · regression · refs #1492Problem
When an output buffer is active (
ob_start()), Zendsystem()andpassthru()echo child process stdout into that buffer and return the last line (system()only). This compiler returns the last line forsystem()but leaves the active buffer empty;passthru()buffer is also empty.Verified 2026-06-28 — repro prints
system_ob_ok=1/passthru_ob_ok=1on Zend vs0on VM.php-src reference
ext/standard/exec.c—PHP_FUNCTION(system),PHP_FUNCTION(passthru)Repro
test/repro/maintainer_gap_system_passthru_ob.phpImplementation hints (PHP-in-PHP)
ext/standard/system.php/passthru.php(or shared exec helper): route captured child stdout through VM output layer so active OB handlers receive itsystem()/passthru()bypass OB) — ensure fix covers buffered capture, not only default SAPI stdoutDone when
system_ob_ok=1andpassthru_ob_ok=1on VMRelated