PHP opening tag error
adriaangijssen (8)

When I create a PHP script with opening tag, a syntax error pops up:
syntax error, unexpected '<', expecting end of file

When I remove the opening tag (bad programming!), then the script runs fine. But the syntax highlighting don't work. I know the workaround for highlighting: put the opening tag in comments.

I hope this is a bug and will be fixed soon. Is there any more information available?

You are viewing a single comment. View All
Answered by enigma_dev (92) [earned 5 cycles]
View Answer
adriaangijssen (8)

@enigma_dev In the past it was no problem to use an opening tag. It's not a big problem, but if you're, in my case, learning students PHP, you have to learn them the correct syntaxis. If you combine PHP with HTML, an opening tag is needed.
It would be great if in the use of an opening tag is optional, not 'forbidden'.

It's great if you would report that highlighting bug! How do I mark your answer as the correct answer? I'm new at the forum. ;-)