I was just working on some curl work, until I bumped into a interesting if statement. Thinking that it would never execute the if statement, to my surprise it does. How does this execute?
<?php
while (6 && 2 == 2) {
$test = "How the hell?!!?";
}
?>
The only reason I can think that it works is that 6 evaluates to true and 2 equals to 2 which is true. Am I correct in this thinking? Originally I thought it could not execute as 6 clearly dosen't equal 2.