Can anyone explain this operator please? I realise its now deprecated in 7.4 so refactoring.
This example:
if ($this->interestAreas()->count() > 0) {
$ids ?: $ids = $this->interestAreas()->pluck('id');
$this->interestAreas()->detach();
}
I understand it when ?: is used assigning a variable eg: $newUser = ($user) :? null; but not as above. Can anyone explain how that may be rewritten?
Imagine
?and:as conditional variables, a string likecan be read like: