I\'m trying to use return in a ternary operator, but receive an error:
Parse error: syntax error, unexpected T_RETURN
Here\'s the code:
No. But you can have a ternary expression for the return statement.
return
return (!$e) ? '' : array('false', $e);
Note: This may not be the desired logic. I'm providing it as an example.