Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    PHP Logical Operators

    PHP provides three logical operators when we test more than one condition to make decisions. These are: && (meaning logical AND), || (meaning logical OR) and ! (meaning logical NOT).

    Operator Description
    && And operator performs logical conjunction on two expressions
    (if both expressions evaluate to True, result is True. If either expression evaluates to False, the result is False)
    || Or operator performs a logical disjunction on two expressions
    (if either or both expressions evaluate to True, the result is True).
    ! Not operator performs logical negation on an expression.


    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.