Answer the question
In order to leave comments, you need to log in
How does the terra operator work in PHP?
$a = "";
$b = 5;
$c = $a ?? $b; // $c примет значение $a, если она существует и не равна null
// $a существует и равна пустой строке. А пустая строка равна null. То есть $c должна принять значение $b
echo "" == null; // true
// но в итоге получаем $c == "";
echo $c == ""; // true
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question