Category
Language: · behaviour users see when things go wrong · child of #36379
Why
The differential sweep compares stdout; the compliance corpus compares recorded stdout. Nothing compares stderr text, warning order, exit code and shutdown sequence against Zend — and those are what frameworks, test runners and ops tooling depend on (register_shutdown_function for fatal handling, set_error_handler for converting warnings to exceptions, exit codes for CI). Wave 1 found VM fatals that exited 255 silently (#36208) and a false "Undefined variable" warning (#36245); the class is wider than that.
Deliverable
script/differential-sweep.sh --stderr: compare stdout, stderr (after normalising paths/line numbers via a small allowlist of regexes) and exit status.
- 40 cases under
test/differential/cases/errors/: uncaught exception (message/trace format), nested exception chain with getPrevious, warning inside a function called from a loop, @ suppression, set_error_handler returning false, exception thrown from __destruct, destructor order for globals/locals at shutdown, exit() inside finally, register_shutdown_function after fatal, error inside included file (file:line must be the included file), E_DEPRECATED on PHP 8.4 profile, TypeError messages for typed params/returns, DivisionByZeroError, ArgumentCountError, uncaught Error in {main} exit code 255, exit(3) propagation, assert() failure.
- AOT-BASELINE gets a stderr section; the corpus runs in the compiler gate.
Done when
Category
Language:· behaviour users see when things go wrong · child of #36379Why
The differential sweep compares stdout; the compliance corpus compares recorded stdout. Nothing compares stderr text, warning order, exit code and shutdown sequence against Zend — and those are what frameworks, test runners and ops tooling depend on (
register_shutdown_functionfor fatal handling,set_error_handlerfor converting warnings to exceptions, exit codes for CI). Wave 1 found VM fatals that exited 255 silently (#36208) and a false "Undefined variable" warning (#36245); the class is wider than that.Deliverable
script/differential-sweep.sh --stderr: compare stdout, stderr (after normalising paths/line numbers via a small allowlist of regexes) and exit status.test/differential/cases/errors/: uncaught exception (message/trace format), nested exception chain withgetPrevious, warning inside a function called from a loop,@suppression,set_error_handlerreturning false, exception thrown from__destruct, destructor order for globals/locals at shutdown,exit()insidefinally,register_shutdown_functionafter fatal, error insideincluded file (file:line must be the included file),E_DEPRECATEDon PHP 8.4 profile,TypeErrormessages for typed params/returns,DivisionByZeroError,ArgumentCountError, uncaughtErrorin{main}exit code 255,exit(3)propagation,assert()failure.Done when
--stderrmode exists and is green for VM on the 40 cases; AOT failing-name list recorded with an issue per shape