PHP Code Completion Medium +20 XP
Null Coalescing
Complete the null coalescing operator.
PHPFill in the blank
$name = $_GET["name"] ___ "Guest";Type the missing code
Show answer and explanation
Answer: ??
The ?? operator returns the left side if it exists and is not null, otherwise returns the right side.
Hint: PHP's null coalescing operator.
What this challenge tests
Code Completion in PHP: null-coalescing, operators.