In terms of your original example...
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;
...it's saying that if empty($exclude_boards) evaluates as true, then initialize $exclude_boards as an empty array, otherwise set it equal to its current value. Or in if/else code:
if(empty($exclude_boards)) // if $exclude_boards is not set or has an "empty" value
{
$exclude_boards = array(); // initialize it as an empty array
}
else
{
$exclude_boards = $exclude_boards; // use its current value
}
I doubt that I would have used the ternary operator in this situation. I suspect I would just have done something like:
if(!isset($exclude_boards))
{
$exclude_boards = array();
}
Or, if it's important that $exclude_boards be and array and there's any possibility that it could be set as something else:
if(!isset($exclude_boards) or !is_array($exclude_boards))
{
$exclude_boards = array();
}