Open
Description
Description
add a new writing possibility, so that :
$array = [...($var !== null) ? ['key' => $var] : []];
could be shortened to
$array = ['key' ?=> $var];
So , if $var = null;
then $array
would result to []
and if $var = false;
then $array
would result to['key' => false]
( same as using an array_merge() + array_filter() )