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 Comparison Operators

    Use of PHP Comparison Operators is comparing two values (number or string).

    Operator Description
    == Is equal to
    === Identical
    != Is not equal to
    <> Is not equal to
    !== Is Identical
    > Greater than
    < Less than
    >= Greater than or equal to
    <= Less than or equal to

    Example:

    <?php
    $a = 20;
    $b = 30;
    
    if ($a == $b) {
        echo "a and b is equal";
    } else {
        echo "a is not equal to b";
    }
    ?>


    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.