This is commonly seen in Perl and PHP with stuff like
launchMissiles() or die('failure'); launchMissiles() or die('failure'); my $variable = 0 or 1;
Would result in $variable == 0 because it really looks like this: (my $variable = 0) or 1;
I allowed myself to get burned by this once because I didn't read the fine print. ^^;;That code is identical to:
launchMissiles() || die('failure');Also, using or instead or || for these types of things is more readable since it makes your intent of conditional code execution (as opposed to boolean evaluation) clear.
Considering 99.9% of it's use in PHP is some variant of "connect() or die()", I stand by my statement. Besides, those "connect() or die()" expressions are widely considered bad-practice in the first place.
launchMissiles() and die('mutual annihilation");