Tag: PHP7.4

Null Coalescing Assignment Operator in PHP 7.4

October 27, 2020 By arifpavel
php7.4

Added with PHP 7, the coalesce operator (??) comes in handy when we need to use a ternary operator in conjunction with isset(). It returns the first operand if it exists and is not NULL. Otherwise, it returns the second operand. Here is an example: What this code does is pretty straightforward: it fetches the request parameter and sets a […]