Quote:
Originally Posted by Devil_Lord2
On first site I would say it was a mistake, and fix it to have brackets..
I agree not to teach like this, but if you are the only one ever going to touch your scripts.. I suppose it doesn't matter if it works for you.. lol
But if someone in the future may have to go over it.. Again it could confuse them... I'm not totally experienced in programming, so I don't know, others may be able to pick it up what it means faster.. Even if I did pick it up, I'd take the time to fix it towards a common style for others and myself in case I look at it again in the future.
|
It is good practice to always format well, even if you're the only person who is going to see it. You will generally make less mistakes.
Quote:
|
This would return true if true? and if it isn't the same, it would still return false?
|
It will return the result of the statement.
PHP Code:
echo(1 == 1); // echoes true
echo(1 == 0); // echoes false
echo("a" == "a"); // echoes true
echo((5 + 2) == 7); // echoes true