In an online tutorial I have seen the following snippet of code:
$this->data = $data ?: \Input::all();
Is this a standard ternary operator? What would happen when $data
evaluates to true
?
Does the following code do the same thing as the original I posted?
$this->data = $data ? null : \Input::all();