PHPantom version
phpantom_lsp 0.7.0-44-g728f760
Installation method
Built from source
Operating system
Linux x86_64
Editor
Neovim
Bug description
the correct type of the first $s assignment is string, not string[]
Steps to reproduce
- file:
<?php
/** @var list<array{foo: string}> */
$foo = [
['foo' => 'asdf qwer']
];
foreach($foo as $bar) {
$s = $bar['foo'];
$s = explode(" ", $s);
}
- the first
$s shows type as string[] which is incorrect
Error output or panic trace
.phpantom.toml
Additional context
No response
PHPantom version
phpantom_lsp 0.7.0-44-g728f760
Installation method
Built from source
Operating system
Linux x86_64
Editor
Neovim
Bug description
the correct type of the first
$sassignment isstring, notstring[]Steps to reproduce
$sshows type asstring[]which is incorrectError output or panic trace
.phpantom.toml
Additional context
No response