|
Posted by joshuajnoble on 11/10/07 00:12
Thanks for the help the &= and & is clear to me now. I wasn't getting
an error, it just didn't echo out any value from the &= when I set the
$var to an int value. Thanks again.
On Nov 9, 3:49 pm, "Steve" <no....@example.com> wrote:
> "Darko" <darko.maksimo...@gmail.com> wrote in message
>
> news:1194632959.294732.216730@k79g2000hse.googlegroups.com...
>
>
>
> > On Nov 9, 7:11 pm, "Steve" <no....@example.com> wrote:
> >> "Darko" <darko.maksimo...@gmail.com> wrote in message
>
> >>news:1194624540.774587.257620@o3g2000hsb.googlegroups.com...
>
> >> > On Nov 9, 3:35 pm, joshuajnoble <joshuajno...@gmail.com> wrote:
> >> >> Is there any difference between doing:
>
> >> >> $var & 0x80;
>
> >> >> and
>
> >> >> $var &= 0x80;
>
> >> >> I've seen the second, using the &= in production code, but on my local
> >> >> machine it errors out. Any thoughts?
>
> >> > $var &= 0x80 <=> $var = $var & 0x80
>
> >> perhaps <=> is a non-standard equality to the op. you mean that both
> >> accomplish the same thing...they are just two different ways of writing
> >> the
> >> same thing, right?
>
> > In math, <=> means "is equivalent to".
>
> right. however, i was considering the question posed by the op...dealing
> with hex and bits. he's probably not going to immediately see that you're
> saying they're equal.
>
> no big.
[Back to original message]
|