Re: [PHP-DEV] PHP 8.2 proposal: "match", allow "default" as conditional_expression, e.g. 'en_US', 'en_GB', default => loadDefaults()

2021-11-22 Thread Andreas
On 22.11.21 22:06, Nikita Popov wrote: On Mon, Nov 22, 2021 at 7:18 PM Andreas wrote: Hi internals, This is a proposal to allow to append the `default` pattern by comma to the end of the last match branch. (Like a conditional_expression) This allows to re-use the

Re: [PHP-DEV] PHP 8.2 proposal: "match", allow "default" as conditional_expression, e.g. 'en_US', 'en_GB', default => loadDefaults()

2021-11-22 Thread Nikita Popov
On Mon, Nov 22, 2021 at 7:18 PM Andreas wrote: > Hi internals, > > This is a proposal to allow to append the `default` pattern by comma to > the end of the last match branch. (Like a conditional_expression) > > This allows to re-use the return_expression if required and avoids code >

[PHP-DEV] PHP 8.2 proposal: "match", allow "default" as conditional_expression, e.g. 'en_US', 'en_GB', default => loadDefaults()

2021-11-22 Thread Andreas
Hi internals, This is a proposal to allow to append the `default` pattern by comma to the end of the last match branch. (Like a conditional_expression) This allows to re-use the return_expression if required and avoids code duplication. PROPOSAL: PHP 8.2 loadGermanLanguageSettings(),