Skip to content

Glossary: PHP Basics

?? (null coalescing operator)

Also written: ??, null coalescing, null coalescing operator

An operator that gives the value on its left if it exists and isn't null, and the value on its right otherwise. It never warns about a missing key, so it's used to read form input safely.

Where the book teaches it

Related terms

ternary operatorisset()null