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

Identical Operator

Identical is the state of two variables, which contain the same data, with the same type. It is the same as equality, without the type-juggling.

Identical operators are ===, !==. The match() command also uses identical comparisons.

<?php

    var_dump(0 == "0000"); // true
    var_dump(0 === "0");   // false
    var_dump(0 === 0);     // true
    
?>

Documentation

See Also