PHP xor Keyword

PHP abstract Keyword
PHP while Keyword

In this article, you will learn about XOR keyword in PHP. The xor keyword is a logical operator. Logical operators are used to combining conditional statements. The return value will only be true if one of the statements is true and the other one is false.

examples of the XOR keyword

Example 1. In this example, we output a message only if just one of the expressions is true.

<?php
if(5 < 3 xor 5 < 10) {
  echo "Only one of the expressions was true";
}
?>
PHP abstract Keyword
PHP while Keyword
en English
X
Scroll to Top