Re: [PHP] Logical OR in assignment
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Thu, 28 Sep 2006 11:24:28 -0500 (CDT)
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 please correct me
because
I'd like to use it. <g>)
Check the operator precedence, as you might need $a = ($b || $c); but
there's nothing to stop you from using it if it make sense in context.
These basic operators are quite clearly documented in the manual...
Hint, hint.
--
Like Music?
http://l-i-e.com/artists.htm
.
- References:
- Logical OR in assignment
- From: "Jason Karns"
- Re: [PHP] Logical OR in assignment
- From: Larry Garfield
- Logical OR in assignment
- Prev by Date: Re: [PHP] Wallet based shopping cart
- Next by Date: RE: [PHP] Best open source project/framework to support a php training course?
- Previous by thread: Re: [PHP] Logical OR in assignment
- Next by thread: Re: Logical OR in assignment
- Index(es):
Relevant Pages
|