Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Operators

An operator takes one or more values, or expressions in programming jargon, and yields another value, so that the construction itself becomes an expression.

<?php

    // not operator, unary
    $a = !$b;
    
    // plus operator
    $c = $d + 2;
    
    // ternary operator
    $e = $d ? 3 : 2;

?>

Documentation

See Also