Page 1 of 1

using Single & operator

Posted: Tue Jan 18, 2011 1:04 am
by Homesick
what is the use of a single & operator in if statement such as:

Code: Select all

if (a>b & c>d)
.....

Re: using Single & operator

Posted: Tue Jan 18, 2011 1:42 am
by Homesick
Thanks prensil ,,

In Java using single & could be used as bitwise operator,,, and could be used in if statement to force the compiler to execute both operands, but "&&" in if statement will get false if one of the two operands get false. so is the scenario is the same in php ??

Thanks,