Home > Net >  VSCode: PHP syntax error on multiple return types
VSCode: PHP syntax error on multiple return types

Time:08-27

syntax errors

Its ok where we have one return type, and syntax error when two

What should i install to have correctly supported syntax for this, There is no mistake in code and php-interpreter accepts this fully correct use

CodePudding user response:

You need PHP 8.0 or newer to support union types

CodePudding user response:

It looks like some plugin configuration error.

What vscode plugin do you use?

I recommend to install this one - it has support of php >8.0 features, which will be useful and probably solve your problem.

  • Related