Might be that I'm used to PHP (where break doesn't apply to if's) but I find this somewhat odd:
Code: Select all
$i = 3;
while (1)
{
$i--;
if ($i == 0) { break 2; }
}Besides, maybe I'm not seeing the obvious, but why would you ever break from a if? Isn't it the same/easier to just close the bracket?
Any reason this was done that way, and not like PHP does it? Any other opinions as to which is better?
XYplorer Beta Club