Since PHP 8 the following triggers a "Undefined array key ..." warning:
list($a, $b) = explode(',', 'foo');
if(!$b) {
// ...
}
I know that i can refactor this like ...
$arr = explode(',', 'foo');
$a = $arr[0] ?? null;
$b = $arr[1] ?? null;
if(!$b) {
// ...
}
... but I sense there is a more elegant way. Is there?