r/PHPhelp • • Jun 12 '25

Solved PHP Code Editor

(PHP code editor that grays out HTML when working with PHP and vice versa)

Greetings! (And sorry if the question is misplaced)

Couple of years ago I saw a code editor that grayed out all HTML blocks when working with PHP code blocks and grayed out PHP code blocks when working with HTML. Switching happened automatically: when text cursor was put in the PHP code all HTML code was grayed out, focusing on PHP, and when cursor was put in HTML code, all PHP code was grayed out, focusing on HTML.

Unfortunately, I forgot what that editor was and cannot find it now. Can anyone advise its name?

------------------

UPD: PHPDesigner has this feature (thanks to u/LordAmras). However, if you know any other editor with this feature, please, feel free to add.

6 Upvotes

50 comments sorted by

View all comments

Show parent comment

1

u/obstreperous_troll Jun 13 '25

I think it's fair to point out that one is relying on a tool that reinforces bad practices, but I agree it's not really an XY problem. There's a lot of legacy code out there, and I sure wouldn't mind a phpstorm plugin that did this for when I'm trying to modernize Wordpress code.

1

u/LordAmras Jun 13 '25

You can show the better way of doing it if you first solve the problem the person asking the question has. That's a less annoying way of doing that dismissing the question and telling the person that he is bad for having the problem in the first place.

"This plug-in / editor does what you are asking but look also at templating systems, is currently best practice separating php from html for reasons: 1,2,3,4"

Thats a better answer, imho