// This is a single-line comment# This is also a single-line comment/*
This is a multiple-lines comment block
that spans over multiple
lines
*/// You can also use comments to leave out parts of a code line
$a = 2 /* - 1 */ + 4;echoecho "Hello friends!\n";echo "How are you ?  
this is multi line  
text !\n";echo "Hello \"Hello\" Hello\n";$num= 17;  
echo "num = $num\n";  
// or => echo "num = ".$num."\n";
// or => echo 'num = '.$num."\n";echo 10;echo "red"," yellow"," black";echo ("function\n");echo "My name is 'Anton'\n";
echo 'My name is "Anton"';print$result = print"Hello\n";
echo "result = $result"; // output: 1printprint "hello","world"; // errorechoprintprint$result = print 10;
echo $result; // output: 1printprint 10,20,30; // error$str = "string"; // "hello" "Gamarjoba" 'levani' and so on.$int_num = 10; // -12 400 9999 -123421 90 and so on.$float_num = 2.5; // -1.5 20.5 150.7 and so on.$human = true; // equals 1
$robot = false; // equals 0$laptops = array("Dell","Lenovo","Hp",1,2,3);define(name, value, case-insensitive)// define constant
define("PI",3.141592);
echo PI;$arr = []; // or $arr = array();
$arr[0] = "Levani";
$arr[1] = "Nika";
$arr[2] = "Giorgi"; // or $arr = ["levani","Nika","Giorgi"]
$arr[] = "Saba"; // add last element in arr
echo "I am $arr[0] \n"; // output: I am Levani$ages = [
	"John" => 15,
	"Michael" => 25,
	"Levani" => 19,
	"Mads" => 57
	];
//          or
// $ages["John"] = "15";
// $ages["Michael"] = "25";
// $ages["Levani"] = "19";
// $ages["Mads"] = "57";
echo "I am ".$ages["Levani"]." years old \n"; // output: I am 19 years old$laptop = [
	"Lenovo" => [
		"price" => 1200,
		"color" => "white",
		"storage" => "300 Gb",
		],
	"Dell" => [
		"price" => 1000,
		"color" => "black",
		"storage" => "500 Gb",
		],
	];
echo "My laptop price is ".$laptop["Dell"]["price"].".\n"; // output: My laptop price is 1000.\necho "Co\nding\n";
// output:	    Co
//      	    ding\techo "Co\tding\n";
// output:          Co	ding$x++; // equivalent to $x = $x+1;
$x--; // equivalent to $x = $x-1; 
$x++; // post-increment 
$x--; // post-decrement 
++$x; // pre-increment 
--$x; // pre-decrement$a  = 2; $b = $a++; // $a=3,  $b=2
$a  = 2; $b = ++$a; // $a=3,  $b=3$a  = 2; $b = $a--; // $a=1,  $b=2
$a  = 2; $b = --$a; // $a=1,  $b=1$x = 10;
$y = $x;
echo $y; // output: 10Assignment	   Same as...	        Description
  $x = $y	  $x = $y	    The left operand gets set to the value of the expression on the right	
  $x += $y	  $x = $x + $y	    Addition	
  $x -= $y	  $x = $x - $y	    Subtraction	
  $x *= $y	  $x = $x * $y	    Multiplication	
  $x /= $y	  $x = $x / $y	    Division	
  $x %= $y	  $x = $x % $y      Modulus$x = 15;
$x %= 4; // output: 3
$x = 5;
$x *= 6; // output: 30Operator	 Name	                      Example	           Result	
  ==	        Equal	                     $x == $y	   Returns true if $x is equal to $y	
  ===	        Identical	             $x === $y	   Returns true if $x is equal to $y, and they are of the same type	
  !=	        Not equal	             $x != $y	   Returns true if $x is not equal to $y	
  <>	        Not equal	             $x <> $y	   Returns true if $x is not equal to $y	
  !==	        Not identical	             $x !== $y	   Returns true if $x is not equal to $y, or they are not of the same type	
  >	        Greater than	             $x > $y	   Returns true if $x is greater than $y	
  <	        Less than	             $x < $y	   Returns true if $x is less than $y	
  >=	        Greater than or equal to     $x >= $y	   Returns true if $x is greater than or equal to $y	
  <=	        Less than or equal to	     $x <= $y	   Returns true if $x is less than or equal to $y// Equal
$x = 50;  
$y = "50";
var_dump($x == $y); // returns TRUE because values are equal
echo "\n";// Identical
$x = 50;  // integer type
$y = "50"; // string type
var_dump($x === $y); // returns false because types are not equal
echo "\n";// Not equal
$x = 50;  
$y = "50";
var_dump($x != $y); // returns false because values are equal
echo "\n";// Not equal. Both operators (!= / <>) give the same output. The only difference is that '<>' is in line with the ISO standard while '!= ' does not follow ISO standard.
$x = 50;  
$y = "50";
var_dump($x <> $y); // returns false because values are equal
echo "\n";// Not identical
$x = 50;  
$y = "50";
var_dump($x !== $y); // returns true because types are not equal
echo "\n";// Greater than
$x = 100;
$y = 50;
var_dump($x > $y); // returns true because $x is greater than $y
echo "\n";// Less than
$x = 10;
$y = 50;
var_dump($x < $y); // returns true because $x is less than $y
echo "\n";// Greater than or equal to
$x = 10;
$y = 10;
var_dump($x >= $y); // returns true because $x is greater than or equal to $y
echo "\n";// Less than or equal to
$x = 10;
$y = 10;
var_dump($x <= $y); // returns true because $x is less than or equal to $y
echo "\n";$name = "Mads";$name = "Mads";
echo $NAME; // output: errorfunction sum () {
	echo "10 + 10 = 20 \n";
}
SUM(); // output: 10 + 10 = 20