What is a null coalescing operator in PHP7?

devquora
devquora

Posted On: Feb 22, 2018

 

Null coalescing operator is a new feature added to PHP7. It strictly checks for null or non-existent variable or index. This function is used to replace the ternary operation in conjunction with isset() function and it also returns its first operand if it exists and is not null. Otherwise, it returns the second operand.

Also, Read Laravel interview questions

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    PHP 7 interview questions

    What new features PHP7 has in store for us?

    What new features PHP7 has in store for us?..