v18.0 - PHP Delimiters Highlighting...

User 2413940 Photo


Registered User
34 posts

Nice work on the ole' stalwart html editor! I was attempting to change some of the syntax-color highlighting when I noticed that the PHP-end delimiter '?>' is tied in with 'Script Tags' (eg. JavaScript). So if I change the PHP-end delimiter to match the PHP-start delimiter then the JS script syntax highlighting is also changed to the same color. If I leave as is, then the start and end PHP delimiters don't match as seen in this screen shot.

Gary Chike
"Experience is what you get, when you don't get what you want."
User 122279 Photo


Senior Advisor
14,456 posts

I asked the developer about this not very long ago. He said that it seems to be the same way in other apps too. The end PHP tag is counted as a 'script', apparently.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2413940 Photo


Registered User
34 posts

Curious - I have a dozen apps ranging from simple text editors to dedicated PHP IDE's that don't exhibit that behavior. Here's a screen cast of me playing with a comparable app to HTML Editor (eg. Windows only, small team..) and the PHP start and end tags are both affected when I change the colors. JS script syntax highlighting is not affected since it has its own dedicated category. :cool:
Gary Chike
"Experience is what you get, when you don't get what you want."
User 379556 Photo


Registered User
1,535 posts

At https://www.w3resource.com/php/syntax/syntax.php under the heading 'Omit the PHP closing tag at the end of the file' there is a note which may perhaps be related to this matter.

Frank
User 2413940 Photo


Registered User
34 posts

Hey Frank, that's correct, the PHP closing tag can be omitted if the PHP script is a stand alone script and not embedded within HTML - which for the most part it is embedded since we're in the realm of web development. Although PHP is a general-purpose programming language, it's never taken off outside the realm of the web. :)
Gary Chike
"Experience is what you get, when you don't get what you want."

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.