Null Coalescing Operator(??)

A Null coalescing operator is used when you are unsure whether you have set the value of an element or not. So, in this case, it will print a value not set instead of giving an error that $m is not defined if we used the ternary operator.

			

<?php  echo $m ?? ‘Value not set’; ?>

				

Output:

Value not set