What is === in php?

Here is the example :

$sql = "CREATE DATABASE myDB";
if ($conn->query($sql) === TRUE) {
    echo "Database created successfully";
} else {
    echo "Error creating database: " . $conn->error;
}

What does === means and What it does?

strict equality/identity operator.

testing if two data are the same.

http://php.net/manual/en/language.operators.comparison.php

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.