vscode-intelephense
vscode-intelephense copied to clipboard
For loop, undefined variable in third expression
Describe the bug An undefined variable in third expression, when the variable is created in the for loop, is shown as an error
To Reproduce
(function () {
for ($i = 10; $i > 0; $i-= $o)
{
$o = 1;
}
})();
Take note that if I put the for outside a function, no error is shown
Expected behavior No error
Screenshots
Platform and version windows 10 intelephense 1.8.0
Workaround for now is to declare it beforehand for ($i = 10, $o = 0; $i > 0; $i-= $o)