PHP встроенный, если null check

$username = null;
$name = $username ?? 'unknown';
# Use unknown as name if the username variable isn't set.
TheDutchScorpion