highlight_string

(PHP 4 >= 4.0.0)

highlight_string -- Syntax highlighting of a string

Description

bool highlight_string (string str)

The highlight_string() function prints out a syntax highlighted version of str using the colors defined in the built-in syntax highlighter for PHP. Retorna TRUE em caso de sucesso ou FALSE em falhas.

Dica: Como toda saída é normalmente enviada direto para o browser, você pode usar as Funções de Controle de Output para capturar o resultado e guardá-lo (por exemplo) em uma string.

See also highlight_file(), show_source().