Re: [PHP] Logical OR in assignment

2006-09-28 Thread Richard Lynch
On Wed, September 27, 2006 10:05 pm, Larry Garfield wrote: > The single pipe | is bitwise OR, yes. You're probably thinking of > this > construct: > > a = b || c > > Which is a valid and common default-value idiom in Python and > Javascript, but > I don't think works in PHP. (If it does, someone

Re: [PHP] Logical OR in assignment

2006-09-27 Thread Larry Garfield
The single pipe | is bitwise OR, yes. You're probably thinking of this construct: a = b || c Which is a valid and common default-value idiom in Python and Javascript, but I don't think works in PHP. (If it does, someone please correct me because I'd like to use it. ) On Wednesday 27 Septemb

[PHP] Logical OR in assignment

2006-09-27 Thread Jason Karns
I once saw the use of OR (|) in assignment. $x = $y | $z; Does this use bitwise OR? I'm trying to see if I could use the above expression in place of: $x = is_null($y) ? $z : $y; Jason Karns ~~~ The Ohio State University [www.osu.edu] Computer Science & Engineering [www.cse.osu.edu] --