PHP Logical Operators Tutorial

This video tutorial covers PHP logical operators.

PHP Logical Operators

The logical operators that are used in PHP are listed in the table below.

Operator Description Example
&& and x = 10
y = 5
(x < 15 && y > 1) returns true
|| or x = 10
y = 5
(x == 3 || y == 3) returns false
! not x = 10
y = 5
!(x == y) returns true