Proposal: &$result_code=null parameter in shell_exec()

From: Date: Thu, 18 Nov 2021 07:46:47 +0000
Subject: Proposal: &$result_code=null parameter in shell_exec()
Groups: php.internals 
Request: Send a blank email to internals+get-116439@lists.php.net to get a copy of this message
Hi internals, This is a proposal to add an optional parameter &$result_code = null to the shell_exec() function. For clarity, the current signature is shell_exec(string $command): string|false|null The proposed signature is shell_exec(string $command, int &$result_code = null): string|false|null If present, the result_code parameter is set to the exit code of the command, as it is in exec() and system(). This feature request was also posted by another user on https://bugs.php.net/bug.php?id=81493 I have a draft pull request at https://github.com/php/php-src/pull/7663 Thoughts? Thanks, Luca

« previous php.internals (#116439) next »