Complete the code to assign $value to $input if it exists, otherwise assign 'default'.
$value = $input [1] 'default';
The null coalescing operator ?? returns the left operand if it exists and is not null; otherwise, it returns the right operand.
Complete the condition to check if $data['name'] exists, otherwise use 'Guest'.
echo $data['name'] [1] 'Guest';
The ?? operator returns the left value if it exists and is not null; otherwise, it returns the right value.
Fix the error in the condition to assign $result to $input if set, else 'none'.
$result = [1] ?? 'none';
Use the variable $input directly on the left side of the null coalescing operator ??.
Complete the code to assign $output to $array['key'] if set, else 'missing'.
$output = $array['key'][1] 'missing';
Use square brackets to access the array key and the null coalescing operator to provide a default value.
Complete the code to create a condition that echoes $user['name'] if set, else 'Anonymous', and assigns it to $displayName.
$displayName = $user['name'] 'Anonymous'; echo [1];
Access the array key with brackets, use the null coalescing operator for default, and echo the assigned variable.