Change language

Difference between “! == “and” ==! ” In PHP

Syntax:
$x! == $y 
Where $x and $y - operands.==! Operator:Nothing other than this it can be written as == (! Operand), which returns true or false depending on the operands. Both operators return boolean values ​​either true or false.Syntax:
$x ==! $y 
Examples :
Input: $x = true $y = false Operator: $x! == $y Output: true Operator: $x ==! $y Output: true 
Example 1:This program uses both operands and returns the result.
// PHP demo program
//! == and ==! statement 
// Declare variables $x = true; $y = false; $z = true;  
// Using the operator! == echo "Using! == operator" ;  
// Isn’t $x equal to $y
// this is how it came back var_dump ( $x ! == $y );  
// Isn’t $x equal to $z
// this is how false was returned var_dump ( $x ! == $z );  
// Isn’t $y equal to $z
// this is how it came back var_dump ( $y ! == $z );  
// Use ==! operator echo "Using ==! operator" ;  
// equals $x equals (! $Y)
// this is how it came back var_dump ( $x ==! $y );  
// equals $x equals (! $Z)
// this is how the lie came back var_dump ( $x ==! $z );  
// equals $y equals (! $Z)
// this is how it came back var_dump ( $y ==! $z );  
?>
Exit:
Using! = = operator bool (true) bool (false) bool (true) Using ==! operator bool (true) bool (false) bool (true) 
Program 2: < ? php
// PHP demo program
//! == and ==! statement 
// Dsclare associative array $x = array ( "1" = > "Geeks" , "2" = > "for" , "3" = > "Geeks"); $y = array ( "5" = > "Tony" , "6" = > "Captain" , "7" = > "Thor ");  
// Combine $x and $y $z = $x + $y ;  
// Using the operator! == echo "Using! == operator" ;  
// Isn’t $x equal to $y
// this is how it came back var_dump ( $x ! == $y );  
// Isn’t $x equal to $z
// this is how it came back var_dump ( $x ! == $z );  
// Isn’t $y equal to $z
// this is how it came back var_dump ( $y ! == $z );  
// Use ==! operator echo "Using ==! operator" ;  
// equals $x equals (! $Y)
// this is how the lie came back var_dump ( $x ==! $y );  
// equals $x equals (! $Z)
// this is how the lie came back var_dump ( $x ==! $z );  
// equals $y equals (! $Z)
// this is how the lie came back var_dump ( $y ==! $z );  
?>
Exit:
Using! = = operator bool (true) bool (true) bool (true) Using ==! operator bool (false) bool (false) bool (false) 

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method