Further down the page I found this:
Then $val is "", since the expression is equivilent to
($val = $choice1) or $choice2 or $default;
To get $val to be "dog" use:
$val=$choice1 or $val=$choice2 or $val=$default;
which is equivilent to
($val=$choice1) or ($val=$choice2) or ($val=$default);