Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
== and === operator in PHP
What is the difference between == and === operator in PHP ? In PHP == is equal operator and returns TRUE if $a is equal to $b after type juggling and === is Identical operator and return TRUE if $a is equal to $b, and they are of the same data type
<?php 
 $a=true ;
 $b=1;
 // Below condition returns true and prints a and b are equal
 if($a==$b){
  echo "a and b are equal";
 }
 else{
  echo "a and b are not equal";
 }
 //Below condition returns false and prints a and b are not equal because $a and $b are of  different data types.
 if($a===$b){
  echo "a and b are equal";
 }
 else{
  echo "a and b are not equal";
 }
?>
``
by Tinatin Kvinikadze
3 years ago
0
PHP
operator
0
by nikoloz nachkebia
3 years ago
0
PHP
PHP For loop
1
by დავით ქუთათელაძე
3 years ago
0
PHP
user defined functions
1
by დავით ქუთათელაძე
3 years ago
0
PHP
else if statement
1
by დავით ქუთათელაძე
3 years ago
0
PHP
if else statement
1
by nikoloz nachkebia
3 years ago
0
PHP
Case Sensitivity
1
easy and logical
by nikoloz nachkebia
3 years ago
0
PHP
math functions
1
This function are case-sensitive
echo str_replace("World","Peter","Hello world!");
output: Hello Peter!
This function are case-insensitive
echo str_ireplace("WORLD","Peter","Hello good world!");
output: Hello good Peter!
by saba chankvetadze
3 years ago
0
PHP
string
0
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.
by Tinatin Kvinikadze
3 years ago
0
PHP
variables
0
Difference between echo and print
Echo
echo is a statement, which is used to display the output. echo can be used with or without parentheses. echo does not return any value. We can pass multiple strings separated by comma (,) in echo. echo is faster than print statement.
Print
print is also a statement, used as an alternative to echo at many times to display the output. print can be used with or without parentheses. print always returns an integer value, which is 1. Using print, we cannot pass multiple arguments. print is slower than echo statement.
by Tinatin Kvinikadze
3 years ago
0
PHP
output
0
Results: 1578