php type juggling
Occurs when php mistreats data types that resulting in unintended output
eg : "1" + 2 = 3
(“Puppies” == 0) -> True== Operator
$secret_password = "mYs3cr3tP@ssw0rd";
$input_password = "0e12345678"; // User input (not intended to be a number)
if ($secret_password == $input_password) {
echo "Access granted!";
} else {
echo "Access denied!";
}("mYs3cr3tP@ssw0rd" == 0) -> True= Operator
= OperatorLast updated