Ternary Operator ?: PHP Short Code (IF ELSE)
?: is like a gate that lets anything falsy through – including NULL Anything falsy: 0, empty string, NULL, false, !isset(), empty() Same like old ternary operator: X ? Y : Z Note: ?: will throw PHP NOTICE on undefined (unset or !isset()) variables Use of ?: checking empty(), !isset(), is_null() etc shorten ternary operation […]