When you create a new php file in phpStorm and write something, there will be a red line prompting Expecting Statement. There is no error found in the method. If you write an empty method, there will be a red line. Have you ever encountered this problem? How to solve it
When you create a new php file in phpStorm and write something, there will be a red line prompting Expecting Statement. There is no error found in the method. If you write an empty method, there will be a red line. Have you ever encountered this problem? How to solve it
Remove public, because public is the way to write it in class
Screenshots and code are for the full version. . .
You did write public wrong here, but please note that sometimes phpstorm will show some inexplicable prompts, but after you cut and paste the code, it will be fine, so you still can’t trust the IDE too much, haha
Don’t worry too much about error messages, sometimes it’s just the IDE having trouble!