<html>
<head>
<title> Using comparison operatios </title>
</head>
<body>
<?
/*
Abdelatif Abu alya 100608856
Feb26th, 2017
WEBD2201
*/
$a = 21;
$b = 15;
echo "<p>original value of \$a is $a and \$b is $b</p>";
if ($a == $b) {
echo "<p>Test 1: \$a equals /$b</p>";
} else {
echo "<p>Test 1: \$a is not equal /$b</p>";
}
if ($a != $b) {
echo "<p>Test 2: \$a is not equal to /$b</p>";
} else {
echo "<p>Test 2: \$a is equal to /$b</p>";
}
if ($a > $b) {
echo "<p>Test 3: \$a is grater than /$b</p>";
} else {
echo "<p>Test 3: \$a is not grater than /$b</p>";
}
if ($a < $b) {
echo "<p>Test 4: \$a is less than /$b</p>";
} else {
echo "<p>Test 4: \$a is not less than /$b</p>";
}
if ($a >= $b) {
echo "<p>Test 5: \$a is greater or equal to /$b</p>";
} else {
echo "<p>Test 5: \$a is not greater or to equal /$b</p>";
}
if ($a <= $b) {
echo "<p>Test 6: \$a is less than or equal to /$b</p>";
} else {
echo "<p>Test 6: \$a is not less than or to equal /$b</p>";
}
?>
</body>
</html>
<html>
<head>
<title> Using comparison operatios </title>
</head>
<body>
<?
/*
Abdelatif Abu alya 100608856
Feb26th, 2017
WEBD2201
*/
$a = 21;
$b = 15;
echo "<p>original value of \$a is $a and \$b is $b</p>";
if ($a == $b) {
echo "<p>Test 1: \$a equals /$b</p>";
} else {
echo "<p>Test 1: \$a is not equal /$b</p>";
}
if ($a != $b) {
echo "<p>Test 2: \$a is not equal to /$b</p>";
} else {
echo "<p>Test 2: \$a is equal to /$b</p>";
}
if ($a > $b) {
echo "<p>Test 3: \$a is grater than /$b</p>";
} else {
echo "<p>Test 3: \$a is not grater than /$b</p>";
}
if ($a < $b) {
echo "<p>Test 4: \$a is less than /$b</p>";
} else {
echo "<p>Test 4: \$a is not less than /$b</p>";
}
if ($a >= $b) {
echo "<p>Test 5: \$a is greater or equal to /$b</p>";
} else {
echo "<p>Test 5: \$a is not greater or to equal /$b</p>";
}
if ($a <= $b) {
echo "<p>Test 6: \$a is less than or equal to /$b</p>";
} else {
echo "<p>Test 6: \$a is not less than or to equal /$b</p>";
}
?>
</body>
</html>
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
<html>
<head>
<title> Using comparison operatios </title>
</head>
<body>
<?
/*
Abdelatif Abu alya 100608856
Feb26th, 2017
WEBD2201
*/
$a = 21;
$b = 15;
echo "<p>original value of \$a is $a and \$b is $b</p>";
if ($a == $b) {
echo "<p>Test 1: \$a equals /$b</p>";
} else {
echo "<p>Test 1: \$a is not equal /$b</p>";
}
if ($a != $b) {
echo "<p>Test 2: \$a is not equal to /$b</p>";
} else {
echo "<p>Test 2: \$a is equal to /$b</p>";
}
if ($a > $b) {
echo "<p>Test 3: \$a is grater than /$b</p>";
} else {
echo "<p>Test 3: \$a is not grater than /$b</p>";
}
if ($a < $b) {
echo "<p>Test 4: \$a is less than /$b</p>";
} else {
echo "<p>Test 4: \$a is not less than /$b</p>";
}
if ($a >= $b) {
echo "<p>Test 5: \$a is greater or equal to /$b</p>";
} else {
echo "<p>Test 5: \$a is not greater or to equal /$b</p>";
}
if ($a <= $b) {
echo "<p>Test 6: \$a is less than or equal to /$b</p>";
} else {
echo "<p>Test 6: \$a is not less than or to equal /$b</p>";
}
?>
</body>
</html>
<html>
<head>
<title> Using comparison operatios </title>
</head>
<body>
<p>original value of $a is 21 and $b is 15</p><p>Test 1: $a is not equal /15</p><p>Test 2: $a is not equal to /15</p><p>Test 3: $a is grater than /15</p><p>Test 4: $a is not less than /15</p><p>Test 5: $a is greater or equal to /15</p><p>Test 6: $a is not less than or to equal /15</p>
</body>
</html>