What is Null Coalesce Operator?

Written by Rubin

Posted On: Jan 09, 2019


    1 Answer Written

  •  Rubin
    Posted by Alok Gupta

    Null Coalesce Operator (??) is introduced in PHP 7. This operator is used as a replacement of isset() along with the ternary operator (?:). The Null Coalesce operator (??) returns the result of its first operand if it exists and is not NULL, or else it will return its second operand.

Please Login or Register to leave a response.

Related Questions

PHP 7 interview questions

Explain Scalar type declarations in PHP7.

Scalar type declarations is a new feature of PHP that is introduced in PHP 7. There are two options of Scalar type declaration are available.Strict Coercive ...