What is the correct way to check a passed value in an If statement in PHP?

When checking a passed value in an If statement in PHP, it is important to use the triple equals operator (===) to ensure that both the value and data type match. This will prevent unexpected type coercion and ensure accurate comparisons.

// Example of checking a passed value using triple equals operator
$passedValue = 10;

if ($passedValue === 10) {
    echo "Passed value is equal to 10";
} else {
    echo "Passed value is not equal to 10";
}