Re: PHP syntax


I wrote:
> I think keeping the whole strings including the "->"'s is a good idea,
> as it only highlights correct class/method combinations.

Thought about this a bit more, and came to the conclusion that in code
one doesn't use "class->method", only instances of classes.

I've regenerated the function list from the PHP docs. Now my question is
what I should do with the classes and methods. My current opinion is to
just colour the classes as normal keywords, and use "->method" as an
identifier for methods. This way you can see whether the method is
actually a method (whole string including "->" coloured), or you are
just using a keyword as a method.

Of course the issue that methods that are not valid for the instantiated
class are also highlighted remains, but that is because the syntax
highlighting is not "smart".

What do you think?


mount -t life -o ro /dev/dna /genetic/research

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]