0

I recently read some PHP code and I've seen two operators :

  • A ?? B operator which seems to mean take A if A is not null else take B
  • A ?: B operator this one is the a shortcut for the ternary operator but the effect is the same it take A if A is not null and B otherwise.

Is there any difference between them ?

Xiidref
  • 1,456
  • 8
  • 20

0 Answers0