Page 1 of 1

PHP heredoc

Posted: 28 Feb 2008 13:16
by kaaposc
Hi!

It seems PHP heredoc strings are not treated as strings... Or am I mistaken with syntax coloring/syntax definitions?.. :roll:

Posted: 28 Feb 2008 15:07
by Rickard Johansson
No, you are right. The syntax doesn't handle these strings properly. It is possible to handle them if yoy use a fixed identifier.

E.g.

Put this in the php.syx (I asume you use v4.20 beta 1)

[Block]
...
3_Name=HereDoc string
3_OnLine=No
3_AsString=Yes
3_Start<<<ID
3_End=ID

Now you should be able to use

... <<<ID

comments

ID;

Maybe not a perfect solution. I'll add a better one when I get the time. I need to add some new options to make it work properly.

Posted: 28 Feb 2008 15:41
by kaaposc
Thanks, I tried something like that, but with AsString=No because heredoc can contain PHP variables (so it would be nice to see them colored as variables).. :)