in reply to Question about two operators

Aside from what Corion said, I'll point out that one wouldn't use the expression: 10 || 34 as it is written there. That will always evaluate to 10. However, you'll often see in code things like any of the following when you're not sure the value on the left will have a nonzero value.
$var || 1; $foo || $bar; $rock ||= 42; $paper ||= $scissors;

Replies are listed 'Best First'.
Re^2: Question about two operators
by mreece (Friar) on Oct 17, 2007 at 05:41 UTC
    $rock ||= 42;
    how auspicious, because while 10 || 34 is 10, 10 | 34 is 42!