Open QuentindevePro opened 3 months ago
According to the PHP documentation, $_SERVER["argv"] is an array, but for the Intelephense's LSP, it is typed as a string.
$_SERVER["argv"]
string
If you try this following code:
<?php $argv = $_SERVER["argv"]; $cnt = count($argv);
The LSP will tell you:
Expected type 'Countable|array'. Found 'string'
Which is a false positive.
I noticed this issue also. Probably happened around this time
## [1.11.0 - 2024-06-29] **Pre-Release** - `$argv` is now type `string[]`.
According to the PHP documentation,
$_SERVER["argv"]
is an array, but for the Intelephense's LSP, it is typed as astring
.If you try this following code:
The LSP will tell you:
Which is a false positive.