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
SmokyBarnable
Forum Contributor
Posts: 105 Joined: Wed Nov 01, 2006 5:44 pm
Post
by SmokyBarnable » Fri Nov 24, 2006 5:55 pm
What exactly is the difference between 'and' and '&&'?
Thanks.
brendandonhue
Forum Commoner
Posts: 71 Joined: Mon Sep 25, 2006 3:21 pm
Post
by brendandonhue » Fri Nov 24, 2006 6:27 pm
They have different precedence in the order of operations.
dibyendrah
Forum Contributor
Posts: 491 Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:
Post
by dibyendrah » Sat Nov 25, 2006 1:07 am
They both are logical operators and are same. Just like "OR" and "||" are same.
jmut
Forum Regular
Posts: 945 Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:
Post
by jmut » Sat Nov 25, 2006 5:18 am
and the winner is....... " brendandonhueeeeee"
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Sat Nov 25, 2006 6:41 am
They are
not the same:
brendandonhue wrote: They have different precedence in the order of operations.
dibyendrah
Forum Contributor
Posts: 491 Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:
Post
by dibyendrah » Sat Nov 25, 2006 11:00 am
What is the difference then ? I didn't find any difference.
Oren wrote: They are
not the same:
brendandonhue wrote: They have different precedence in the order of operations.
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Sat Nov 25, 2006 11:09 am
dibyendrah wrote: What is the difference then ? I didn't find any difference.
Oren wrote: They are
not the same:
brendandonhue wrote: They have different precedence in the order of operations.
Read this for an explanation of Operator Precedence
http://uk2.php.net/manual/en/language.o ... precedence
dibyendrah
Forum Contributor
Posts: 491 Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:
Post
by dibyendrah » Sat Nov 25, 2006 11:18 am
okay, both are logical operators but having difference precedence only.