Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120812 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10427 invoked from network); 13 Jul 2023 21:26:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Jul 2023 21:26:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BDDEF180209 for ; Thu, 13 Jul 2023 14:26:17 -0700 (PDT) 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.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS34011 80.237.132.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wp160.webpack.hosteurope.de (wp160.webpack.hosteurope.de [80.237.132.167]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 13 Jul 2023 14:26:16 -0700 (PDT) Received: from [2a02:8109:9d40:1d44:40b6:f5d3:c567:d46c]; authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1qK3pG-0000hI-Ug; Thu, 13 Jul 2023 23:26:14 +0200 Message-ID: Date: Thu, 13 Jul 2023 23:26:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;marc@mabe.berlin;1689283577;1b4cbcf5; X-HE-SMSGID: 1qK3pG-0000hI-Ug Subject: Re: [PHP-DEV] Re: Default values for php.ini environment variables From: marc@mabe.berlin (Marc) On 13.07.23 17:39, Ben Ramsey wrote: >> On Jul 13, 2023, at 08:26, Derick Rethans wrote: >> >> Hi, >> >> coming forth out of an Xdebug issue >> (https://bugs.xdebug.org/view.php?id=2174) I made a pull request so that >> it is possible to use a fallback value in environment variables in INI >> files, such as in: >> >> xdebug.start_with_request = ${PHP_XDEBUG_START_WITH_REQUEST:-default} >> >> This is a syntax that bash also supports. >> >> Ilija pointed out an already existing PR >> (https://github.com/php/php-src/pull/11351) which had been extensively >> reviewed. Its author never seem to have emailed the list, so here I am. >> I would like to see this in PHP 8.3, and don't see the need for an RFC. >> >> If there are no objects, I'll merge this in the next few days. >> This would be a very welcome addition as configuring PHP via environment variables is (at least for me) very importing on serving fargate containers. Same questions ... Is it possible (like in bash) to escape the sequence in case you need the unparsed text for some reason? Does the opposite with :+ work as well?     Example: auto_prepend_file="${PHP_DEBUG:+/path/to/init_debug.php}" Is it possible to chain multiple :- (or :+) together? Anyway even without ":+" or chaining it would be a very good addition :+1: Thanks, Marc