Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP : Difference between '&&' and 'AND' [duplicate]

Tags:

php

Possible Duplicate:
PHP - and / or keywords

Dear All,

I would like to get clear in mind about conditional operators in php. Please clarify me what is the difference between '&&' and 'AND' in php?

Thanks in Advance

like image 507
A.C.Balaji Avatar asked Dec 22 '10 16:12

A.C.Balaji


People also ask

What is difference == and === in PHP?

== Operator: This operator is used to check the given values are equal or not. If yes, it returns true, otherwise it returns false. Syntax: operand1 == operand2. === Operator: This operator is used to check the given values and its data type are equal or not. If yes, then it returns true, otherwise it returns false.

What is the difference between and $$ in PHP?

PHP $ and $$ Variables. The $var (single dollar) is a normal variable with the name var that stores any value like string, integer, float, etc. The $$var (double dollar) is a reference variable that stores the value of the $variable inside it.

What is the difference between $message and $$ message in PHP?

$message is used to store variable data. $$message can be used to store variable of a variable. Data stored in $message is fixed while data stored in $$message can be changed dynamically.

What does <> mean in PHP?

The spaceship operator <=> is the latest comparison operator added in PHP 7. It is a non-associative binary operator with the same precedence as equality operators ( == , !=


1 Answers

They do the same thing, but && has higher precedence than AND.

http://php.net/manual/en/language.operators.precedence.php

like image 196
Jim Mischel Avatar answered Oct 20 '22 11:10

Jim Mischel