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

Identity Comparison

The identity comparison === compares two values, using their respective types, and then, their value. Both must be identical to pass.

There is also the !== operator, for distinct values: either the type, or the value.

<?php

var_dump(1 === 1);    // true

var_dump(1 === true); // false
var_dump(1 == true);  // true

?>

Documentation

See Also