Replies: 1 comment
-
Thanks for reporting the issue. We use html-validator with php plugin which only seems to work with html like php. So to add better support, we may need to bring in the php LSP. That support is planned, but may not come in the next 3 months. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Editing a PHP file that don't have the closing tag, editor shows the error:
failed to tokenize "php\n\nnam...", state TEXT failed to consume data or change state. (parser-error)
Writing the closing tag "?>" at the end of the file makes that error disappear.
I think that, as PHP manual says: "If a file contains only PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script. "
It could be possible to remove that error in this case? I mean, when the file is only PHP code. It's not a big deal to ignore that error, but I think it would be nice not to see it. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions