I have recently set up vsCode with PHP. However, it shows errors on following lines.
public static function myFunction(): bool|string
error : syntax error, unexpected '|', expecting ';' or '{'
$app->options('/{routes:.+}', fn (ResponseInterface $response) => $response);
error : syntax error, unexpected '$response' (T_VARIABLE), expecting ')'
How can I make it recognize that this is the correct syntax.