Name

highlight_string

Synopsis

mixed highlight_string(string source [, bool return ] )

Prints a syntax-colored version of the string source using PHP’s built-in syntax highlighter. Returns true if successful; otherwise, returns false. If return is true, then the highlighted code is returned as a string rather than being sent to the output device.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.