PHP Intelephense code parsing error: why?
13:51 12 Nov 2025

I have this php code in a class called "Test.php".

testVar = $val;
    }
}

I am repeatedly getting an error Undefined variable '$val'. I have tried un/reinstalling intelephense and restarting vscode to no avail.

Any ideas why?

php intelephense php-intelephense