What is the difference between null coalesce operator and elvis?
$a = null; echo $a ?: 'default1'; echo $a ?? 'default2'; It looks to me as they are doing the same job. However there must be difference. :)
Can someone point it out for me?
What is the difference between null coalesce operator and elvis?
$a = null; echo $a ?: 'default1'; echo $a ?? 'default2'; It looks to me as they are doing the same job. However there must be difference. :)
Can someone point it out for me?