Re: Re: Manual nomenclature
| From: | Peter Cowburn | Date: | Thu, 26 Feb 2015 14:05:53 +0000 |
| Subject: | Re: Re: Manual nomenclature | ||
| References: | 1 2 3 4 | Groups: | php.doc php.webmaster |
| Request: | Send a blank email to php-webmaster+get-20766@lists.php.net to get a copy of this message | ||
On 26 February 2015 at 13:42, Christoph Becker <cmbecker69@gmx.de> wrote:
> Maciek Sokolewicz wrote:
>
> > On 25-2-2015 20:38, Hannes Magnusson wrote:
> >> On Wed, Feb 25, 2015 at 9:13 AM, Elmer Beardshall
> >> <aebeardshall@comcast.net> wrote:
> >>> Where is the guide to the color coding and explanation of the manual.
> >>> Example below – green is ?
> >>>
> >>
> >>
> >>
> >>
> >> Interesting question.
> >>
> >> We don't actually even follow
> >> http://php.net/highlight_string so...
> >>
> >> Maybe we should add this to
> >> http://php.net/about.prototypes ?
> >>
> >> -Hannes
> >>
> >
> >
> > Hi Elmers,
> > PHP's highlight_string uses just a very small number of colors, which
> > are defined in
> http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_highlight.h#25
> >
> > Basically that means:
> > Text/HTML: black (#000000)
> > Comments: orange (#FF8000)
> > Tags, trait names, function names, method names, class names, etc.: blue
> > (#0000BB)
> > Encapsulated strings: red (#DD0000)
> > (reserved) Keywords: green (#007700) such as echo, print, etc.).
> >
> > I agree this should be put in a more readable format on the
> > highlight_string and _file pages IMO. Even though there is a warning
> > that the color output may change at any time; IMO it should still tell
> > you what the colors mean.
>
> Aren't the colors configurable via the highlight.* ini settings[1]?
>
> Emitting CSS classes instead of style attributes appear to be reasonable
> improvement nowadays (and might allow to get rid of some ini settings)
> -- however, I presume that would require an RFC due to the BC break.
>
We already hack that on the website [1], e.g. when highlighting code in
user contributed notes.
If we were to "improve" highlight_*() functions, I'd like to see a much
greater improvement than simply changing to use HTML class attributes.
[1]
https://github.com/php/web-php/blob/8b26df29fb/include/layout.inc#L14-L49
>
> [1]
>
> <http://php.net/manual/en/misc.configuration.php#ini.syntax-highlighting>
>
> --
> Christoph M. Becker
>
>