In PHP, the question mark immediately followed by a colon like this ?: is unofficially referred to as the elvis operator. The elvis operator is a variation of the ternary operator that can seem cryptic initially while reading code. However, once it is understood it is a helpful way to quickly write code that reduces the lines of if else statements which makes the code easier to read.
Ternary Operator
To understand the elvis operator the ternary operator must first be understood. The ternary operator is a short hand way of writing if else statements.
The below if else condition checks if $variable1 is true. If it is true then $variable1 is assigned to $result. If $variable1 is false then the string ‘fallback’ is assigned to $result.
if ($variable1) {
$result = $variable1;
} else {
$result = 'fallback';
}
The above code can be condensed to one line of code using the ternary operator as shown below.
$result = $variable1 ? $variable1 : 'fallback';
The ternary operator starts with a condition which in the above code is checking if $variable1 is true. When the condition is true then the value after the question mark character is returned. In this code, if $variable1 is true then $variable1 is returned. When the condition is false then the value after the colon character is returned. In this code, if $variable1 is false then the string ‘fallback’ is returned.
Elvis Operator
The middle part of the ternary operator which is the return value of a true condition that is between the ? character and the : character can be omitted in conditions like the previous code example. This can be done when the value of the condition being checked will be the same value returned if the condition is true. This is sometimes called the Elvis operator or the short ternary operator.
Using the Elvis operator the above code example can be shortened to the code below.
$result = $variable1 ?: 'fallback';
In the above code, if $variable1 is true then $variable1 is returned and assigned $result. If $variable1 is false then the string ‘fallback’ is returned and assigned to $result.
This provides an even more concise line of code that is even quicker to type and read.
Why It Is Called The Elvis Operator
While it is unofficial, the ?: is often called the Elvis operator because it looks like an emoticon with the question mark character being Elvis Presley’s hair and the colon being his eyes.
If you are having a difficult time visualizing why it is called the Elvis operator then first start with a photo of Elvis Presley’s face like the photo below.

Then rotate the photo 90 degrees to the left like the photo below.

Then visualize his iconic hair style as a question mark and his eyes as a colon.

Conclusion
The above examples show how in PHP the code of an if else statement can be reduced using the ternary operator. In conditions when the value being checked to be true is the same as the value that will be returned in a true condition then the ternary operator code can be shortened more by using the Elvis operator that removes the code between the ? character and the : character.
References:
https://www.php.net/manual/en/language.operators.comparison.php