php inline if null check code example
Example: php inline if null check
$username = null;
$name = $username ?? 'unknown';
# Use unknown as name if the username variable isn't set.
$username = null;
$name = $username ?? 'unknown';
# Use unknown as name if the username variable isn't set.