Voting

Please answer this simple SPAM challenge: max(five, eight)?
(Example: nine)

The Note You're Voting On

Mark Simon
7 years ago
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;

<< Back to user notes page

To Top