> Am 18.01.2023 um 23:29 schrieb Larry Garfield <[email protected]>:
> On Tue, Jan 17, 2023, at 1:25 PM, Jesse G. Donat wrote:
>> I'm looking to measure reaction to a proposal.
>>
>> My proposal is to have the STDOUT and STDERR global constants always
>> defined rather than just when running via CLI.
>
> Does anyone know why those constants are left out? Given that the
> functionality can still be used, as noted...
I could imagine old code checking if STDOUT/STDERR is defined to determine if
they are running in CLI.
While there are now other ways to do it it would probably be a minor BC break
to now defined them.
Turning the question around: As there is already a way of accessing
STDOUT/STDERR with php://, should we introduce a BC break?
Side-note: If we decide to now define the constant for all SAPIs, should
defined('STDOUT') etc. throw some sort of warning so code checking for it can
be found more easily?
- Chris
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php