Repository navigation
Regression: fstat Reflection return array — Zend array|false (ext/standard/file.stub.php) #28483
Copy link
Copy link
Closed
Labels
area:vmVirtual machineVirtual machinebugSomething isn't workingSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsPhase 4 – stdlib for web appsstdlib
Description
Activity
- addedbugSomething isn't workingSomething isn't workingphase-4:stdlibPhase 4 – stdlib for web appsPhase 4 – stdlib for web appsarea:vmVirtual machineVirtual machineimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claim
on Aug 7, 2026 Self-contained repro
./script/docker-exec.sh -- bash -lc ' echo -n "Zend: "; php -r "echo (new ReflectionFunction(\"fstat\"))->getReturnType(), PHP_EOL;" echo -n "VM: "; php bin/vm.php -r "echo (new ReflectionFunction(\"fstat\"))->getReturnType(), PHP_EOL;" '
Expect Zend
array|false, VM todayarray.Cleanup note (branch kept)
Remote
agent/advanced-stdlib-28483-fstat-reflectionstill exists (1 commit ahead ofmaster, no open PR):BuiltinInternalArgInfofstat→array|false+ repro/compliance/unit. Leaving it while #28483 is open for a worker to rebase/open PR — not deleting.Prior batch claim left no merged PR; next stdlib agent can reclaim from that branch tip.
Merged via #30085
Verification:
- master
BuiltinInternalArgInfo→ VM Reflectionarray; branch →array|false php bin/vm.php test/repro/issue_28483_fstat_reflection_return.php→array|false- PHPUnit
testFstatStubReturnArrayFalse+FstatReflectionReturnVMTestOK
Next in batch: #28520 (tmpfile/fopen untyped returns), then #28557 (
file→array|false).- master
Metadata
Metadata
Assignees
Labels
area:vmVirtual machineVirtual machinebugSomething isn't workingSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsPhase 4 – stdlib for web appsstdlib
Category
bug· php-src-strict · Reflection return type · ext/standardProblem
ReflectionFunction('fstat')->getReturnType()isarrayon php-compiler andarray|falseon Zend. Runtimefstatcan fail; the stub must advertise|false. Distinct from #23597 (param name$fpvs$stream). Probed 2026-08-07 @3b042898ae.ReflectionFunction('fstat')->getReturnType()array|falsearrayphp-src reference
ext/standard/file.stub.php—function fstat($stream): array\|falsePHP implementation target
fstatinext/standard(or shared stub sync) — returnarray\|false; optionally align param name$streamwith Regression: shell_exec/fstat/fpassthru/disk_* Reflection names drift — Zend command/stream/directory rejected (ext/standard stubs) #23597Repro
Done when
array\|falsematching Zendfstatbehavior unchanged