Menu Samaritan's Purse

HIGHLIGHT_FILE

Syntax highlighting of a file

SYNTAX

highlight_file ( string $filename [, bool $return = FALSE ] ) : mixed

PARAMETERS

filename

Path to the PHP file to be highlighted.

return

Set this parameter to TRUE to make this function return the highlighted code.

RETURN

If return is set to TRUE, returns the highlighted code as a string instead of printing it out. Otherwise, it will return TRUE on success, FALSE on failure.

EXAMPLES

FILENAME

<code><span style="color: #000000">
<span style="color: #0000BB">&lt;? <br /> <br /></span><span style="color: #FF8000">//&nbsp;comment <br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">myfunction</span><span style="color: #007700">() <br />{ <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$myvariable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Hello"</span><span style="color: #007700">; <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$myvariable</span><span style="color: #007700">; <br />} <br /> <br /></span><span style="color: #0000BB">myfunction</span><span style="color: #007700">(); <br /> <br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code>

RETURN

<code><span style="color: #000000">
<span style="color: #0000BB">&lt;? <br /> <br /></span><span style="color: #FF8000">//&nbsp;comment <br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">myfunction</span><span style="color: #007700">() <br />{ <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$myvariable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Hello"</span><span style="color: #007700">; <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$myvariable</span><span style="color: #007700">; <br />} <br /> <br /></span><span style="color: #0000BB">myfunction</span><span style="color: #007700">(); <br /> <br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code>

INI_SET

<code><span style="color: #000000">
<span style="color: #0000ff">&lt;? <br /> <br /></span><span style="color: #ffff00">//&nbsp;comment <br /></span><span style="color: #00ff00">function&nbsp;</span><span style="color: #0000ff">myfunction</span><span style="color: #00ff00">() <br />{ <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff">$myvariable&nbsp;</span><span style="color: #00ff00">=&nbsp;</span><span style="color: #ff0000">"Hello"</span><span style="color: #00ff00">; <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000ff">$myvariable</span><span style="color: #00ff00">; <br />} <br /> <br /></span><span style="color: #0000ff">myfunction</span><span style="color: #00ff00">(); <br /> <br /></span><span style="color: #0000ff">?&gt;</span>
</span>
</code>

PHP