Re: Re: Default values for php.ini environment variables
| From: | Marc | Date: | Thu, 13 Jul 2023 21:26:14 +0000 |
| Subject: | Re: Re: Default values for php.ini environment variables | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120812@lists.php.net to get a copy of this message | ||
On 13.07.23 17:39, Ben Ramsey wrote:
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?On Jul 13, 2023, at 08:26, Derick Rethans <derick@php.net> 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.
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