Hey, > Am 16.10.2022 um 23:56 schrieb David Rodrigues <david.pro...@gmail.com>: > > I like it! > > But what should happen if: > > [ $a ?? '123', $b ] = [];
$a is assigned 123, $b emits undefined key error. > [ $a ?? '123', $b ] = [ 1 ]; $a is assigned 1, $b emits undefined key error. > [ $a ?? '123', $b ] = [ 1, 2 ]; $a is assigned 1, $b is assigned 2. > It also supports ?: operator? > > [ $a ?: '123' ] = []; so $a = '123' > [ $a ?: '123' ] = [ false ]; so $a = '123' > [ $a ?: '123' ] = [ 456 ]; so $a = 456 ?: is out of scope of this RFC; a future RFC may want to take care of that. Bob