Re: [PHP-DEV] Required parameter after optional one

2021-04-12 Thread Nikita Popov
On Fri, Apr 9, 2021 at 9:24 AM Benjamin Morel wrote: > Hi internals, > > I'm wondering why PHP 8 started warning about required parameters declared > after optional ones, when this version is the one that also introduced > named parameters, which can take advantage of this: > > ``` > function tes

[PHP-DEV] Required parameter after optional one

2021-04-09 Thread Benjamin Morel
Hi internals, I'm wondering why PHP 8 started warning about required parameters declared after optional ones, when this version is the one that also introduced named parameters, which can take advantage of this: ``` function test($a = 1, $b) { echo $a, $b; } test(b: 2); ``` > Deprecated: Re