Is there a way to enable full boolean evaluation in PHP, similar to other languages with compiler switches?

In PHP, the default behavior for boolean evaluation is to use loose comparison, which can lead to unexpected results. To enable full boolean evaluation in PHP, you can use the strict comparison operator (===) instead of the loose comparison operator (==). This will ensure that both the value and the type of the operands are compared.

// Enable full boolean evaluation in PHP by using strict comparison
$var1 = 5;
$var2 = '5';

if ($var1 === $var2) {
    echo 'Full boolean evaluation: Equal';
} else {
    echo 'Full boolean evaluation: Not equal';
}