DEV Community

Discussion on: The perfect non-null test

Collapse
 
patricnox profile image
PatricNox • Edited

In PHP I tend to use the irreversible op on null coalesce op for such scenarios

(! $condition) ?? makeCoolProject();