Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116469 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 29276 invoked from network); 21 Nov 2021 15:35:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Nov 2021 15:35:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0F1B41804B4 for ; Sun, 21 Nov 2021 08:31:49 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS14061 188.166.0.0/18 X-Spam-Virus: No X-Envelope-From: Received: from server1.lucapetrucci.net (server1.lucapetrucci.net [188.166.53.163]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 21 Nov 2021 08:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lucapetrucci.net; s=mail; t=1637512306; bh=kwn50z6cF6Ai6yLZwVhGeDUku76jK2N8fuGPvFT4nXI=; h=Date:From:To:Subject:References:In-Reply-To:From; b=rmb5pYZVWfQJW9q5Nbs34x4eDECjr5fw5aDrEgp8TCFm6Vp6b+GVkhh95nsRfPts4 bcId02apH9jNjFjSCYMeTNUKkXUEKHDHIUg3Qe1CLGosq4hiTw5OfXguNNmucdMrwp Rx5XlJMG8VaHx3UORSgbaJAXrOdsQqLRyaJWDOKk+jaQkvyWmEjLUZ9JdhZJ4zZZpo y/37/46VFZs2mBShEoZYhYsDZZq4AyzA4XKZaOPAmvOyTOCtnQq/cVVwPeSB6qINTm BQ5Eu3rtIoqgBt5pAxNZhfn0sI+5bJd0Qu/shhtZyvv8maSF+eDyXxEDL5C5F5y05F 9B0RixTS/IHOg== Date: Sun, 21 Nov 2021 17:31:44 +0100 Reply-To: Luca Petrucci To: internals@lists.php.net Message-ID: <20211121163144.ipyopbywu53uhwwq@lucapetrucci.net> References: <20211118074647.muibn4mgfezzy75b@lucapetrucci.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211118074647.muibn4mgfezzy75b@lucapetrucci.net> Subject: Re: Proposal: &$result_code=null parameter in shell_exec() From: internals@lists.php.net ("Luca Petrucci via internals") On Thu, Nov 18, 2021 at 08:46:47AM +0100, Luca Petrucci via internals wrote: > 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 Hi internals, Having seen the initial comments about this proposal, I'd like to request karma to create the RFC (username: lpt). Thanks, Luca