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 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 truthy. If it is truthy then $variable1 is assigned to $result. If $variable1 is falsey then the string ‘fallback’ is assigned to $result.
if ($variable1) {
$variable2 = $variable1;
} else {
$variable2 = '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 truthy. When the condition is truthy then the value after the question mark character is returned. In this code, if $variable1 is truthy then $variable1 is returned. When the condition is falsey then the value after the colon character is returned. In this code, if $variable1 is falsey then the string ‘fallback’ is returned.
Elvis Operator
The middle part of the ternary operator which is the return value of a truthy condition that is between the ? and the : can be omitted in conditions like the previous code example. 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 truthy then $variable1 is returned and assigned $result. If $variable1 is falsey 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 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.

References:
https://www.php.net/manual/en/language.operators.comparison.php