With isset()
, you can do this:
$foo = [];
$baz = [];
$bar = isset($foo['bar'], $baz[$foo['bar']]) ? $baz[$foo['bar']] : '';
Is it possible to achieve the same thing with null coalescing like:
$bar = ($foo[$bazz['foo']]) ?? ''; //Undefined variable: bazz
Im expecting $bar
to be:
$bar = '';