Why not? Because (for example) $var might be a tied variable
The optimizing behaviour further suggests that it's possible that ($var || 2) can evaluate as false - otherwise I would expect that (at least) the else{} would be optimized away. This is something I've not previously considered and I'm stumped as to how ($var || 2) could be false. Can it ?