PHP syntax highlighting bug? - Post...

User 1893163 Photo


Trial User
6 posts

Hello everyone!

When I write PHP code, I often use HTML code to format the output. The problem is, that sometimes the syntax highlighting for PHP stops working, or even changes to HTML syntax highlighting sometimes :( (See the images below).

I am using CoffeeCup Free HTML editor 2009 on a windows Vista Home Premium computer. I haven´t tried to recreate this on other computers, but the HTML editor keeps doing this over and over again. This error occured on the 2008 Free HTML editor too (I upgraded yesterday).

I have attached some images to help describing this problem.

Working1.png is the code in the editor directly after I´ve opened the document and scrolled down ti the right place. Working2.png shows the same code block after I have pressed enter and then deleted the empty row I created (You can see where he text marker is). The syntax highlighting disappears directly when I insert the empty row using enter.

Have anyone noticed the same problem, or have a solution for this?
Attachments:
User 1981054 Photo


Registered User
7 posts

Hi,
Is the highlighting syntax problem also occurring in the 2009 Version?
:)
User 1893163 Photo


Trial User
6 posts

It seems so. :(
User 2108985 Photo


Registered User
47 posts

Today, I was writing an exercise enbedding php in a html-file ("Ledenbestand.html") and had the same problem in HTML-Editor 2010 build 365.
(see attach: "badsyntax.gif")
At first I thought I'd made a mistake with some syntax and spent a while looking for my error but did not find one.
Then I saved the file and closed it to give it a try to find out where my syntaxerror would be.
The file did work without a problem, so it had to be the wright syntax.
When I reopened the file, everything was just marked fine?
(see attach: "goodsyntax.gif")

I tried to locate where it did go wrong and started over in a new file.
As you can see in attach "good-badsyntax-2", it started good in line 19 tot 22.
Starting on line 23 (with a new if-statement) it went wrong.

Is this a bug or a wrong setting in my editorsettings?
In my "Editor Options" it looks good.
Attachments:
User 184085 Photo


Ambassador
1,707 posts

Have you tried saving the file with a .php extension ?
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 2108985 Photo


Registered User
47 posts

david wilson wrote:
Have you tried saving the file with a .php extension ?


Sorry I made a mistake.:(

I Indeed saved the file as: "Ledenbeheer.php"
User 3004870 Photo


Registered User
9 posts

Ten years later I am experiencing the same problem , with the paid HTML editor v. 17.0 Build 841. Please see the attached jpg.

Windows 10 PC. I have not got it installed on any other computer.

It happens repeatedly, on different files. If I tab to another opened file and back to the affected one, the highlighting reverts to being correct, until I edit it (even adding a single space).

The file has a .php extension.

Any help appreciated, as this is very annoying.

Thanks,
Col

Attachments:
User 3004870 Photo


Registered User
9 posts

PS. Interesting, when I changed <> to != the highlighting returned. So I thought <> must be wrong, but it isn't...

<> and != are 100% interchangeable, and there's absolutely no technical reason to use one over the other.
User 187934 Photo


Senior Advisor
20,181 posts
Online Now

This has been like this as long as I can remember. I edit php pages and all the text goes black, click on another page and then go back to the the previous page and the highlighting is correct.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

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.