# Syntax highlight

- Thread: https://externals.io/message/6671
- Original archive: https://news-web.php.net/php.internals/6671
- Started by Jakub Vrana on 2003-12-22T10:14:32+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #6671 — Jakub Vrana — 2003-12-22T10:14:32+00:00

URL: https://externals.io/message/6671#6671

Hello!

Some characters (like [, ], {, } and backslash sequences) in double
quote strings are highlighted as keywords even on places where they
don't have any special meaning (like [] in "foo[] $a"). I mean
highlighted by `php -s` and highlight_* functions.

These characters are not highlighted in constant strings (i.e. strings
without variables). 

To behave the same in both cases and to not confuse someone by
highlighting characters without special meaning, I am sending this
patch.

Jakub Vrana

---

## #6690 — Andi Gutmans — 2003-12-23T11:13:30+00:00

URL: https://externals.io/message/6671#6690 · In reply to: #6671

Has anyone who's played with the tokenizer lately checked if this patch is OK?

Andi

At 11:14 AM 12/22/2003 +0100, Jakub Vrana wrote:
>Hello!
>
>Some characters (like [, ], {, } and backslash sequences) in double
>quote strings are highlighted as keywords even on places where they
>don't have any special meaning (like [] in "foo[] $a"). I mean
>highlighted by `php -s` and highlight_* functions.
>
>These characters are not highlighted in constant strings (i.e. strings
>without variables).
>
>To behave the same in both cases and to not confuse someone by
>highlighting characters without special meaning, I am sending this
>patch.
>
>Jakub Vrana
