using Single & operator

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Homesick
Forum Newbie
Posts: 16
Joined: Tue Apr 06, 2010 1:53 am

using Single & operator

Post by Homesick »

what is the use of a single & operator in if statement such as:

Code: Select all

if (a>b & c>d)
.....
Homesick
Forum Newbie
Posts: 16
Joined: Tue Apr 06, 2010 1:53 am

Re: using Single & operator

Post 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,
Post Reply