I came across a new syntax for a ternary operation in PHP.
$this->view->totalNumber > $itemsPerPage ? $this->view->renderPaginator = true
: $this->view->renderPaginator = false;
Is this some sort of short-hand for only apply the ternary operation if the resulting value is greater than the existing value for the left side variable?
It’s just the comparison operation. You can rewrite it like this if it helps you understand:
Now a better way to write it would be simply to do: