<?php
// Declare two strings
$str1 = "Hello";
$str2 = "World";
// Concatenation operator
$str3 = $str1 . " " . $str2;
echo "Concatenation operator: $str3 <br>";
// Concatenation assignment operator
$str1 .= $str2;
echo "Concatenation assignment operator: $str1 <br>";
// Equality operator
if ($str1 == $str2) {
echo "Strings are equal <br>";
} else {
echo "Strings are not equal <br>";
}
// Inequality operator
if ($str1 != $str2) {
echo "Strings are not equal <br>";
} else {
echo "Strings are equal <br>";
}
?>