atitthaker Posted August 8, 2006 Share Posted August 8, 2006 I know the diff that AND is loosely bound and && is tightly bound but what is the working diff of the same??? If poss plz give example... Link to comment https://forums.phpfreaks.com/topic/16877-difference-between-and-and/ Share on other sites More sharing options...
zq29 Posted August 8, 2006 Share Posted August 8, 2006 Its all to do with precedence, [b]&&[/b] and [b]||[/b] have a higher precedence than [b]AND[/b] and [b]OR[/b]. I see it like this...[code]<?php$a && $b OR $c; //Would be equal to ($a && $b) || $c;$a AND $b || $c; //Would be equal to $a && ($b || $c);$a && $b || $c; //Would be equal to ($a && $b) || $c;?>[/code]I think it's easier just to use parenthesise... Link to comment https://forums.phpfreaks.com/topic/16877-difference-between-and-and/#findComment-71059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.