Wrong syntax highlight of array variables inside strings
(btw this is a bug report, not an "idea")
Note the wrong highlight of "$a[f" inside the string
Oh come on, I can't upload a screenshot??
Oh now I do have an "idea": replace this thing with a proper bug tracker
While this is wrong, your code is also wrong. The highlighter uses the exact same rules as PHP itself. The correct version (of your code) also highlights fine: https://3v4l.org/OjbNS
And by the way, even my original example was valid.
Whether the constant "foo" is defined or not is completely irrelevant to the scope of this issue (also note that the use of an undefined constant only generates a notice; it's a bad practice but not invalid code).
"The highlighter uses the exact same rules as PHP itself" - Evidently, not.
@Sjon I linked the wrong example:
This is correct and highlights wrongly.
AdminSjon Hortensius (Admin, 3v4l) commented
I can confirm this, no need for a screenshot. I’ve updated the ace-editor but this is still an issue.