bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.57k stars 93 forks source link

str_starts_with() not recognized #2817

Closed Jibeji closed 4 months ago

Jibeji commented 4 months ago

Hi, str_starts_with() not recognized with v1.10.2

This:

$string = "abcd";
if (str_starts_with($string, 'a')) {
   echo 'true';
}

shows: image

bmewburn commented 4 months ago

what value do you have for intelephense.environment.phpVersion?

Jibeji commented 4 months ago

Thank you! I ignored this setting had to be changed. It was set for some reason to 7.1.0. Since I've changed it to 8.0.0 str_starts_with() is recognized. However, I've noticed these are still not:

bmewburn commented 4 months ago

Check your intelephense.stubs setting. Add random if it ismissing.