Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php inline if null check

$username = null;
$name = $username ?? 'unknown';
# Use unknown as name if the username variable isn't set.
 
PREVIOUS NEXT
Tagged: #php #inline #null #check
ADD COMMENT
Topic
Name
4+4 =