The following code should never execute like that in any other language that I know (C, C++, C#, etc.)
<?php
$do = true;
for($i=0; $i<3; $i++) {
if($do===true) {
$some_variable = 666;
echo $some_variable;
$do = false;
}
if(isset($some_variable)) {
echo $some_variable;
}
}
Why PHP won't unset a $some_variable
in next loop iteration?