note 104456 deleted from language.operators.comparison by crell

From: Date: Wed, 30 Mar 2022 21:48:48 +0000
Subject: note 104456 deleted from language.operators.comparison by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217793@lists.php.net to get a copy of this message
Note Submitter: Mark Simon ---- The use of 5.3’s shortened ternary operator allows PHP to coalesce a null or empty value to an alternative: $value = $planA ?: $planB; My own server doesn’t yet run 5.3. A nice alternative is to use the “or” operator: $value = $planA or $value = planB;

« previous php.notes (#217793) next »