Snippets tagged “null-coalesce-operator”
1 snippet uses this tag.
- Best way to give a variable a default value (simulate Perl ||, ||= )PHP
The best way to give a variable a default value in PHP is to use the ternary operator ?:.
1 snippet uses this tag.
The best way to give a variable a default value in PHP is to use the ternary operator ?:.