Location: PHPKode > scripts > GeSHi > docs/geshi-doc.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en">
<head>
	<title>GeSHi Documentation</title>
	<style type="text/css">
	<!--
		html {
			background-color: #e6e6e6;
		}
		body {
			font-family: Verdana, Arial, sans-serif;
			margin: 10px;
			border: 2px solid #d0d0d0;
			background-color: #f6f6f6;
			padding: 10px;
		}
		p, ul, ol, div, blockquote {
			font-size: 80%;
			line-height: 140%;
			letter-spacing: 1px;
			color: #002;
		}
		acronym {
			border-bottom: 1px dotted #303030;
			cursor: help;
		}
		blockquote {
			font-weight: bold;
		}
		pre {
			border: 1px solid #c0e6ff;
			background-color: #e0e8ef;
			color: #002;
		}
		hr {
			height: 0;
			border: none;
			border-top: 1px dotted #404040;
			width: 75%;
		}
		var {
			color: blue; font-style: normal; font-family: monospace;
		}
		li {
			padding-bottom: 2px;
		}
		ul li {
			font-size: 12px;
		}
		ul ul li {
			font-size: 12px;
		}
		ul ul ul li {
			font-size: 12px;
		}
		.note {
			border: 1px solid yellow;
			background-color: #ffc;
			color: #220;
			padding: 5px;
			margin: 1em 0 0 .75em;
		}
		.caution {
			border: 6px double red;
			background-color: #fcc;
			color: #200;
			padding: 5px;
			margin: 1em 0 0 .75em;
		}
		.caution p:first-child, .note p:first-child {
			margin-top: 0;
		}
		.caution-header {
			border: 1px solid red;
			border-width: 1px 2px 2px 1px;
			margin-top: -1.6em;
			background-color: #fcc;
			width: 10%;
			font-weight: bold;
			text-align: center;
			color: #600;
		}
		.note-header {
			border: 1px solid #ff0;
			border-width: 1px 2px 2px 1px;
			margin-top: -1.2em;
			background-color: #ffc;
			width: 10%;
			font-weight: bold;
			text-align: center;
			color: #660;
		}
		.nav {
			font-size: 70%;
		}
		.nav a {
			color: #707070;
			border: 1px solid #a0a0a0;
			border-width: 0 1px 1px 1px;
			border-top: 1px dotted #c0c0c0;
			text-decoration: none;
			padding: 1px 2px;
			background-color: #e0e0e0;
			-moz-border-radius-bottomleft: 3px;
			-moz-border-radius-bottomright: 3px;
		}
		h1, h2 {
			margin-top: 0;
			margin-bottom: 0;
			text-align: center;
			color: #404060;
		}
		h2 {
			text-align: left;
		}
		h3 {
			border-bottom: 1px dotted #b0b0b0;
			margin-top: 2em;
			border-top: 1px dotted #b0b0b0;
			background-color: #ddd;
			margin-bottom: 0;
		}
		h4 {
			margin-top: 1.6em;
			border-bottom: 1px dotted #c0c0c0;
			margin-bottom: 0;
		}
		h5 {
			border-bottom: 1px dotted #d0d0d0;
			margin-top: 1.2em;
			margin-bottom: 0;
		}
		h3, h4, h5 {
			color: #707070;
			font-weight: normal;
		}
		a {
			color: #7777ff;
		}
	-->
	</style>
</head>
<body>
<h1 id="top">GeSHi Documentation</h1>
<h5 style="text-align: center;">Version 1.0.7.11</h5>
<pre>Author:          Nigel McNie
Copyright:       &copy; Nigel McNie, 2004
Email:           <a href="mailto:hide@address.com">hide@address.com</a>
GeSHi Website:   <a href="http://qbnz.com/highlighter">http://qbnz.com/highlighter</a></pre>

<p>This is the documentation for <acronym>GeSHi</acronym> - Generic Syntax Highlighter.
The most modern version of this document is available on the web -
go to <a href="http://qbnz.com/highlighter/documentation.php">http://qbnz.com/highlighter/documentation.php</a> to view it.</p>

<p>Any comments, questions, confusing points? Please <a href="mailto:hide@address.com">contact me!</a> I
need all the information I can get to make the use of GeSHi and
everything related to it (including this documentation) a breeze.</p>

<h2 id="contents">Contents</h2>

<ul>
	<li><a href="#introduction">1. Introduction</a></li>
	<ul>
		<li><a href="#features">1.1 Features</a></li>
		<li><a href="#about-geshi">1.2 About GeSHi</a></li>
		<li><a href="#credits">1.3 Credits</a></li>
		<li><a href="#feedback">1.4 Feedback</a></li>
	</ul>

	<li><a href="#the-basics">2. The Basics</a></li>
	<ul>
		<li><a href="#getting-geshi">2.1 Getting GeSHi</a></li>
		<li><a href="#installing-geshi">2.2 Installing GeSHi</a></li>
		<ul>
			<li><a href="#requirements">2.2.1 Requirements</a></li>
			<li><a href="#extracting-geshi">2.2.2 Extracting GeSHi</a></li>
			<li><a href="#installation">2.2.3 Installation</a></li>
		</ul>
		<li><a href="#basic-usage">2.3 Basic Usage</a></li>
	</ul>

	<li><a href="#advanced-features">3. Advanced Features</a></li>
	<ul>
		<li><a href="#the-code-container">3.1 The Code Container</a></li>
		<li><a href="#line-numbers">3.2 Line Numbers</a></li>
		<ul>
			<li><a href="#enabling-line-numbers">3.2.1 Enabling Line Numbers</a></li>
			<li><a href="#styling-line-numbers">3.2.2 Styling Line Numbers</a></li>
			<li><a href="#starting-line-numbers">3.2.3 Choosing a Start Number</a></li>
		</ul>
		<li><a href="#using-css-classes">3.3 Using <acronym>CSS</acronym> Classes</a></li>
		<ul>
			<li><a href="#enabling-css-classes">3.3.1 Enabling CSS Classes</a></li>
			<li><a href="#setting-css-class-id">3.3.2 Setting the CSS Class/ID</a></li>
			<li><a href="#getting-stylesheet">3.3.3 Getting the Stylesheet</a></li>
			<li><a href="#using-an-external-stylesheet">3.3.4 Using an External Stylesheet</a></li>
		</ul>
		<li><a href="#changing-styles">3.4 Changing Styles</a></li>
		<ul>
			<li><a href="#the-overall-styles">3.4.1 The Overall Styles</a></li>
			<li><a href="#line-number-styles">3.4.2 Line Number Styles</a></li>
			<li><a href="#setting-keyword-styles">3.4.3 Setting Keyword Styles</a></li>
			<li><a href="#setting-comment-styles">3.4.4 Setting Comment Styles</a></li>
			<li><a href="#setting-other-styles">3.4.5 Setting Other Styles</a></li>
		</ul>
		<li><a href="#case-caps">3.5 Case Sensitivity and Auto Casing</a></li>
		<ul>
			<li><a href="#auto-caps-nocaps">3.5.1 Auto Caps/Nocaps</a></li>
			<li><a href="#setting-case-sensitivity">3.5.2 Setting Case Sensitivity</a></li>
		</ul>
		<li><a href="#changing-config">3.6 Changing the Source/Language/Path/Charset</a></li>
		<ul>
			<li><a href="#changing-the-source">3.6.1 Changing the Source Code</a></li>
			<li><a href="#changing-the-language">3.6.2 Changing the Language</a></li>
			<li><a href="#changing-the-path">3.6.3 Changing the Path</a></li>
			<li><a href="#changing-the-charset">3.6.4 Changing the Character Set</a></li>
			<li><a href="#changing-using-load-from-file">3.6.5 Using <tt>load_from_file</tt> to change the language and source code</a></li>
		</ul>
		<li><a href="#error-handling">3.7 Error Handling</a></li>
		<li><a href="#disabling-lexics">3.8 Disabling Styling of Some Lexics</a></li>
		<li><a href="#setting-tab-width">3.9 Setting the Tab Width</a></li>
		<li><a href="#using-strict-mode">3.10 Using Strict Mode</a></li>
		<li><a href="#adding-removing-keywords">3.11 Adding/Removing Keywords</a></li>
		<ul>
			<li><a href="#adding-a-keyword">3.11.1 Adding a Keyword</a></li>
			<li><a href="#removing-a-keyword">3.11.2 Removing a Keyword</a></li>
			<li><a href="#adding-a-keyword-group">3.11.3 Adding a Keyword Group</a></li>
			<li><a href="#removing-a-keyword-group">3.11.4 Removing a Keyword Group</a></li>
		</ul>
		<li><a href="#headers-and-footers">3.12 Headers and Footers for your code</a></li>
		<ul>
			<li><a href="#keyword-substitution">3.12.1 Keyword Substitution</a></li>
			<li><a href="#setting-header-content">3.12.2 Setting Header Content</a></li>
			<li><a href="#setting-footer-content">3.12.3 Setting Footer Content</a></li>
			<li><a href="#styling-header-content">3.12.4 Styling Header Content</a></li>
			<li><a href="#styling-footer-content">3.12.5 Styling Footer Content</a></li>
		</ul>
		<li><a href="#keyword-urls">3.13 Keyword URLs</a></li>
		<ul>
			<li><a href="#setting-a-url">3.13.1 Setting a URL for a Keyword Group</a></li>
			<li><a href="#disabling-urls">3.13.2 Disabling URLs for a Keyword Group</a></li>
			<li><a href="#styling-links">3.13.3 Styling Links</a></li>
			<li><a href="#using-targets">3.13.4 Setting the Link Target</a></li>
		</ul>
		<li><a href="#using-contextual-importance">3.14 Using Contextual Importance</a></li>
		<li><a href="#highlighting-special-lines-extra">3.15 Highlighting Special Lines &quot;Extra&quot;</a></li>
		<ul>
			<li><a href="#specifying-lines-to-highlight-extra">Specifying the Lines to Highlight Extra</a></li>
			<li><a href="#styles-for-highlighted-lines">Styles for the Highlighted Lines</a></li>
		</ul>
		<li><a href="#adding-ids-to-each-line">3.16 Adding IDs to Each Line</a></li>
		<li><a href="#getting-the-time-of-styling">3.17 Getting the Time of Styling</a></li>
	</ul>

	<li><a href="#language-files">4 Language Files</a></li>
	<ul>
		<li><a href="#language-file-example">4.1 An Example Language File</a></li>
		<li><a href="#language-file-conventions">4.2 Language File Conventions</a></li>
		<li><a href="#language-file-sections">4.3 Language File Sections</a></li>
		<ul>
			<li><a href="#language-file-header">4.3.1 The Header</a></li>
			<li><a href="#language-file-start-indices">4.3.2 The First Indices</a></li>
			<li><a href="#language-file-keywords">4.3.3 Keywords</a></li>
			<li><a href="#language-file-symbols-case">4.3.4 Symbols and Case Sensitivity</a></li>
			<li><a href="#language-file-styles">4.3.5 Styles for your Language Files</a></li>
			<li><a href="#language-file-urls">4.3.6 URLs for Functions</a></li>
			<li><a href="#language-file-oo-support">4.3.7 Object Orientation Support</a></li>
			<li><a href="#language-file-regexps">4.3.8 Using Regular Expressions</a></li>
			<li><a href="#language-file-strict-mode">4.3.9 Contextual Highlighting and Strict Mode</a></li>
			<li><a href="#language-file-tidying-up">4.3.10 Tidying Up</a></li>
		</ul>
	</ul>

	<li><a href="#method-constant-reference">5 Method/Constant Reference</a></li>
</ul>

<h3 id="introduction">1: Introduction</h3>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#features">Next</a> | <a href="#contents">Previous</a></div>

<p>GeSHi is exactly what the acronym stands for: a <strong>Generic Syntax Highlighter</strong>. As long
as you have a language file for almost any computer language - whether it be a
scripting language, object orientated, markup or anything in between - GeSHi can
highlight it! GeSHi is extremely customisable - the same source can be highlighted
multiple times in multiple ways - the same source even with a different language.
GeSHi outputs <acronym>XHTML</acronym> strict compliant code<sup><a href="#xhtml-strict-note">*</a></sup>, and can
make use of <acronym>CSS</acronym> to save on the amount of output. And what is the cost for all of this? You need
<a href="http://www.php.net/">PHP</a>. That's all!

<p style="font-size: x-small;"><a name="xhtml-strict-note" id="xhtml-strict-note">*</a>Most of the time.
Some languages do not output XHTML strict code, and using line numbers with the PRE header is not legal either.
These problems will be fixed in 1.2.</p>

<h4 id="features">1.1: Features</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#about-geshi">Next</a> | <a href="#introduction">Previous</a></div>

<p>Here are some of the standout features of GeSHi:</p>

<ul>
	<li><strong>Programmed in PHP:</strong> GeSHi is coded entirely in PHP. This means that where ever you have PHP, you
    can have GeSHi! Almost any free webhost supports PHP, and GeSHi works fine with PHP > 4.1.0.</li>
	<li><strong>Support for many languages:</strong> GeSHi comes with over <em>50</em> languages, including <acronym>PHP</acronym>,
	<acronym>HTML</acronym>, <acronym>CSS</acronym>, Java, C, Lisp, <acronym>XML</acronym>, Perl, Python, <acronym>ASM</acronym> and many more!</li>
	<li><strong><acronym>XHTML</acronym> compliant output:</strong> GeSHi produces XHTML compliant output, using stylesheets, so you need not worry about
	GeSHi ruining your claims to perfection in the standards department ;)</li>
	<li><strong>Highly customisable:</strong> GeSHi allows you to change the style of the output on the fly, use CSS classes or not, use an external
	stylesheet or not, use line numbering, change the case of output keywords... the list goes on and on!</li>
	<li><strong>Flexible:</strong> Unfortunately, GeSHi is quite load/time intensive for large blocks of code. However, you want speed?
	Turn off any features you don't like, pre-make a stylesheet and use CSS classes to reduce the amount of output and more - it's easy
	to strike a balance that suits you.</li>
</ul>

<p>This is just a taste of what you get with GeSHi - the best syntax highlighter for the web in the world!</p>

<h4 id="about-geshi">1.2: About GeSHi</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#credits">Next</a> | <a href="#features">Previous</a></div>

<p>GeSHi started as a mod for the <a href="http://www.phpbb.com/"><acronym>phpBB</acronym> forum system</a>, to enable highlighting of more
languages than the available (which was 0 ;)). However, it quickly spawned into an
entire project on its own. But now it has been released, work continues on a mod
for phpBB<sup><a href="#phpbb-note">*</a></sup> - and hopefully for many forum systems, blogs and other web-based systems.</p>

<p style="font-size: x-small;"><a name="phpbb-note" id="phpbb-note">*</a>I am no longer working on this MOD, however if someone else wants to they
can contact me for more information.</p>

<p>Several systems are using GeSHi now, including:</p>

<ul>
	<li><a href="http://www.splitbrain.org/docuwiki/">Dokuwiki</a> - An advanced wiki engine</li>
	<li><a href="http://gtk.php.net/">gtk.php.net</a> - Their manual uses GeSHi for syntax highlighting</li>
	<li><a href="http://www.wordpress.org/">WordPress</a> - A powerful blogging system<sup><a href="#plugin-only">*</a></sup></li>
	<li><a href="http://www.php-fusion.co.uk/">PHP-Fusion</a> - A constantly evovling CMS</li>
	<li><a href="http://cypreess.dione.cc/sqlm">SQL Manager</a> - A Postgres DBAL</li>
	<li><a href="http://www.mamboserver.com/">Mambo</a> - A popular open source CMS</li>
	<li><a href="http://www.mediawiki.org/">MediaWiki</a> - A leader in Wikis<sup><a href="#plugin-only">*</a></sup></li>
	<li><a href="http://www.tikiwiki.org/">TikiWiki</a> - A megapowerful Wiki/CMS</li>
    <li><a href="http://www.tikipro.org/">TikiPro</a> - Another powerful Wiki based on Tikiwiki</li>
	<li><a href="http://robloach.net/projects/phpscripts/rweb/">RWeb</a> - A site-building tool</li>
</ul>

<p style="font-size: x-small;"><a name="plugin-only" id="plugin-only">*</a> Available as plugin only. In addition, some of the other entries mentioned
here may only have GeSHi available as a plugin.</p>

<p>GeSHi is the work of me, <a href="mailto:hide@address.com">Nigel McNie</a>.  Others have helped with aspects of GeSHi
also, they're mentioned in the <a href="THANKS">THANKS</a> file.</p>

<h4 id="credits">1.3: Credits</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#feedback">Next</a> | <a href="#about-geshi">Previous</a></div>

<p>Many people have helped out with GeSHi, whether by creating language files, submitting bug
reports, suggesting new ideas or simply pointing out a new idea or something I'd missed. All
of these people have helped to build a better GeSHi, you can see them in the <a href="THANKS">THANKS</a>
file.</p>

<p> Do you want your name on this
list? Why not make a language file, or submit a valid bug? Or perhaps help me with an
added feature I can't get my head around, or suggest a new feature, or even port
GeSHi to anothe language? There's lots you can do to help out, and I need it all :)</p>

<h4 id="feedback">1.4: Feedback</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#the-basics">Next</a> | <a href="#credits">Previous</a></div>

<p>I need your feedback! ANYthing you have to say is fine, whether it be a query,
congratulations, a bug report or complaint, I don't care! I want to make this software
the best it can be, and I need your help! You can contact me in the following ways:</p>

<ul>
	<li><strong>E-mail:</strong>  <a href="mailto:hide@address.com">hide@address.com</a></li>
	<li><strong>Forums:</strong>  <a href="http://sourceforge.net/forum?group_id=114997">Sourceforge.net Forums</a> or
	<a href="http://qbnz.com/highlighter/">GeSHi home forums</a></li>
</ul>

<p>Remember, any help I am grateful for :)</p>

<h3 id="the-basics">2: The Basics</h3>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#getting-geshi">Next</a> | <a href="#feedback">Previous</a></div>

<p>In this section, you'll learn a bit about GeSHi, how it works and what it uses, how
to install it and how to use it to perform basic highlighting.</p>

<h4 id="getting-geshi">2.1: Getting GeSHi</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#installing-geshi">Next</a> | <a href="#the-basics">Previous</a></div>

<p>If you're reading this and don't have GeSHi, that's a problem ;). So, how do you get
your hands on it? Visit <a href="http://qbnz.com/highlighter/downloads.php">http://qbnz.com/highlighter/downloads.php</a> to obtain the latest
version.</p>

<h4 id="installing-geshi">2.2: Installing GeSHi</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#requirements">Next</a> | <a href="#getting-geshi">Previous</a></div>

<p>Installing GeSHi is a snap, even for those most new to PHP. There's no tricks involved. Honest!</p>

<h5 id="requirements">2.2.1: Requirements</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#extracting-geshi">Next</a> | <a href="#installing-geshi">Previous</a></div>

<p>GeSHi requires the following to be installable:</p>

<ul>
	<li><strong><a href="http://www.php.net/">PHP</a></strong>. It's untested with anything other than 4.3.X. I hope to extend this range soon.
	I see no reason why it won't work with any version of PHP above 4.1.0.</li>
	<li><strong>Approximately 700 kilobytes of space</strong>. The actual script is small - around 85K - but most
  	of the size comes from the large number of language files (over 50!). If you're pushed for space, make sure
	you don't upload to your server the <tt>docs/</tt> or <tt>contrib/</tt> directory, and you may want to leave
	out any language files that don't take your fancy either.</li>
</ul>

<p>As you can see, the requirements are very small. If GeSHi does NOT work for you in a
particular version of PHP, let me know why and I'll fix it.</p>

<p>Packages come in <tt>.zip</tt>, <tt>.tar.gz</tt> and <tt>.tar.bz2</tt> format, so there's no complaining about whether
it's available for you. *nix users probably want <tt>.tar.gz</tt> or <tt>.tar.bz2</tt> and windows users
probably want <tt>.zip</tt>.</p>

<h5 id="extracting-geshi">2.2.2: Extracting GeSHi</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#installation">Next</a> | <a href="#requirements">Previous</a></div>

<p>To extract GeSHi in Linux (<tt>.tar.gz</tt>):</p>

<ol>
	<li>Open a shell</li>
	<li><kbd>cd</kbd> to the directory where the archive lies</li>
	<li>Type <kbd>tar -xzvf [filename]</kbd>  where <tt>[filename]</tt> is the name of the archive (typically <tt>GeSHi-1.X.X.tar.gz</tt>)</li>
	<li>GeSHi will be extracted to its own directory</tt>
</ol>

<p>To extract GeSHi in Windows (<tt>.zip</tt>):</p>

<ol>
	<li>Open Explorer</li>
	<li>Navigate to the directory where the archive lies</li>
	<li>Extract the archive. The method you use will depend on your configuration.
	Some people can right-click upon the archive and select "Extract" from there,
	others may have to drag the archive and drop it upon an extraction program.</li>
</ol>

<p>To extract from <tt>.zip</tt> you'll need an unzipping program - unzip in Linux, or Winzip,
Winrar or similar for Windows.</p>

<h5 id="installation">2.2.3: Installation</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#basic-usage">Next</a> | <a href="#extracting-geshi">Previous</a></div>

<p>GeSHi is nothing more than a PHP class with related language support files.
Those of you familiar with PHP can then guess how easy the installation will
be: simply copy it into your include path somewhere. You can put it wherever
you like in this include path. I recommend that you put the language files
in a subdirectory of your include path too - perhaps the same subdirectory
that geshi.php is in. <strong>Remember this path</strong> for later.</p>

<p>If you don't know what an include path is, don't worry. Simply copy GeSHi to
your webserver. So for example, say your site is at <tt>http://mysite.com/myfolder</tt>,
you can copy GeSHi to your site so the directory structure is like this:</p>

<pre>http://mysite.com/myfolder/geshi/[language files]
http://mysite.com/myfolder/geshi.php</pre>

<p>Or you can put it in any subdirectory you like:</p>

<pre>http://mysite.com/myfolder/includes/geshi/[language files]
http://mysite.com/myfolder/includes/geshi.php</pre>

<div class="caution"><div class="caution-header">Caution:</div><p>When using GeSHi on a live site, the only directory
required is the <tt>geshi/</tt> subdirectory. Both <tt>contrib/</tt> and <tt>docs/</tt> are worthless, and furthermore,
as some people discovered, one of the files in contrib had a security hole (fixed as of 1.0.7.3). I suggest you delete
these directories from any live site they are on.</p></div>

<h4 id="basic-usage">2.3: Basic Usage</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#advanced-features">Next</a> | <a href="#installation">Previous</a></div>

<p>Use of GeSHi is very easy. Here's a simple example:</p>

<code><span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">// Include the GeSHi library</span><br />

<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #b1b100;">include_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'geshi.php'</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">// Define some source to highlight, a language to use</span><br />
<span style="color: #808080; font-style: italic;">// and the path to the language files</span><br />

<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #0000ff;">$source</span> = <span style="color: #ff0000;">'$foo = 45;<br />
for ( $i = 1; $i &lt; $foo; $i++ )<br />
{<br />

&nbsp; echo &quot;$foo&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;;<br />
&nbsp; --$foo;<br />
}'</span>;<br />
<span style="color: #0000ff;">$language</span> = <span style="color: #ff0000;">'php'</span>;<br />

<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">// Create a GeSHi object</span><br />
<span style="color: #808080; font-style: italic;">//</span><br />

<span style="color: #0000ff;">$geshi</span> =&amp; <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #0000ff;">$language</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//</span><br />

<span style="color: #808080; font-style: italic;">// And echo the result!</span><br />
<span style="color: #808080; font-style: italic;">//</span><br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
</code>

<p>As you can see, there's only three really important lines:</p>

<code><span style="color: #b1b100;">include_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'geshi.php'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>This line includes the GeSHi class for use</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #0000ff;">$language</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>This line creates a new GeSHi object, holding the source and the language
you want to use for highlighting.</p>

<code><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>This line spits out the result :)</p>

<p>So as you can see, simple usage of GeSHi is really easy. Just create a new
GeSHi object and get the code!</p>

<p>Since version 1.0.2, there is a function included with GeSHi called <code>geshi_highlight</code>.
This behaves exactly as the php function <code>highlight_string</code> behaves - all you do is pass
it the language you want to use to highlight and the path to the language files as well as the source.
Here are some examples:</p>

<code><span style="color: #808080; font-style: italic;">// Simply echo the highlighted code</span><br />
geshi_highlight<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'php'</span>, <span style="color: #0000ff;">$path</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #808080; font-style: italic;">// Get the code back, for use later</span><br />
<span style="color: #0000ff;">$code</span> = geshi_highlight<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'java'</span>, <span style="color: #0000ff;">$path</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><br />
<br />
<span style="color: #808080; font-style: italic;">// Check if there is an error with parsing this code</span><br />

<a href="http://www.php.net/ob_start"><span style="color: #000066;">ob_start</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$result</span> = geshi_highlight<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'perl'</span>, <span style="color: #0000ff;">$path</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$code</span> = <a href="http://www.php.net/ob_get_contents"><span style="color: #000066;">ob_get_contents</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />

<a href="http://www.php.net/ob_end_clean"><span style="color: #000066;">ob_end_clean</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> !<span style="color: #0000ff;">$result</span> <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// There was an error with highlighting...</span><br />

<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// All OK :)</span><br />
<span style="color: #66cc66;">&#125;</span>
</code>

<p>However, these are really simple examples and doesn't even begin to cover all
the advanced features of GeSHi. If you want to learn more, continue on to
section 3: Advanced Features.</p>


<h3 id="advanced-features">3: Advanced Features</h3>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#the-code-container">Next</a> | <a href="#basic-usage">Previous</a></div>

<p>This section documents the advanced features of GeSHi - strict mode, using
CSS classes, changing styles on the fly, disabling highlighting of some things
and more.</p>

<p>In this section there are many code snippets. For all of these, you should assume
that the GeSHi library has been included, and a GeSHi object has been created
and is referenced by the variable <var>$geshi</var>. Normally, the source, language and path
used are arbitary.</p>

<h4 id="the-code-container">3.1  The Code Container</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#line-numbers">Next</a> | <a href="#advanced-features">Previous</a></div>

<p>The <strong>Code Container</strong> has a fundamental effect on the layout of your code before you
even begin to style. What is the Code Container? It's the bit of markup that goes
around your code to contain it. By default your code is surrounded by a <tt>&lt;pre&gt;</tt>, but
you can also specify a <tt>&lt;div&gt;</tt>.</p>

<p>The <tt>&lt;pre&gt;</tt> header is the default. If you're familiar with HTML you'll know that
whitespace is rendered &quot;as is&quot; by a <tt>&lt;pre&gt;</tt> element. The advantage for you is that
if you use <tt>&lt;pre&gt;</tt> the whitespace you use will appear pretty much exactly how it is
in the source, and what's more GeSHi won't have to add a whole lot of <tt>&lt;br /&gt;</tt>'s and
non-breaking spaces (<tt>&amp;nbsp;</tt>) to your code to indent it. This saves you source code
(and your valuable visitors waiting time and your bandwidth).</p>

<p>But if you don't like <tt>&lt;pre&gt;</tt> or it looks stupid in your browser no matter what styles
you try to apply to it or something similar, you might want to use a <tt>&lt;div&gt;</tt> instead.
A <tt>&lt;div&gt;</tt> will result in more source - GeSHi will have to insert whitespace markup -
but in return you can wrap long lines of code that would otherwise have your browser's
horizontal scrollbar appear. Of course with <tt>&lt;div&gt;</tt> you can *not* wrap lines if you please.
The highlighter demo at the <a href="http://qbnz.com/highlighter/demo.php">GeSHi home page</a> uses the
<tt>&lt;div&gt;</tt> approach for this reason.</p>

<p>At this stage there isn't an option to wrap the code in <tt>&lt;code&gt;</tt> tags (unless you use the
function <tt>geshi_highlight</tt>), partly because of the inconsistent and unexpected ways stuff in <tt>&lt;code&gt;</tt>
tags is highlighted. Besides, <tt>&lt;code&gt;</tt> is an inline element. But this may become an option in future versions.</p>

<p>As of GeSHi 1.0.7.2 there is a new header type, that specifies that the code should not be wrapped in
anything at all.</p>

<p>To change/set the header to use, you call the <strong><tt>set_header_type()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_header_type</span><span style="color: #66cc66;">&#40;</span>GESHI_HEADER_DIV<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// or...</span><br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_header_type</span><span style="color: #66cc66;">&#40;</span>GESHI_HEADER_PRE<span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// or...</span><br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_header_type</span><span style="color: #66cc66;">&#40;</span>GESHI_HEADER_NONE<span style="color: #66cc66;">&#41;</span>;</code>

<p>Those are the only three arguments you should pass to set_header_type. Passing anything
else may cause inconsistencies in what is used as the Code Container (although it
*should* simply use a <tt>&lt;pre&gt;</tt>). Better not to risk it.</p>

<div class="note"><div class="note-header">Note:</div><p>GESHI_HEADER_DIV, GESHI_HEADER_PRE and GESHI_HEADER_NONE are <em>constants</em>, so don't put them
in strings!</p></div>

<div class="caution"><div class="caution-header">Caution:</div><p>The default styles for the <tt>&lt;pre&gt;</tt> and <tt>&lt;div&gt;</tt> <em>will
be different, especially if you use line numbers!</em>. I have found that a <tt>&lt;pre&gt;</tt> results
in code that is smaller than for that of a <tt>&lt;div&gt;</tt>, you should rectify this difference
by using <strong><tt>set_overall_style()</tt></strong> if you need to. But be aware of this
difference for if you are changing the header type!</p></div>

<h4 id="line-numbers">3.2: Line Numbers</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#enabling-line-numbers">Next</a> | <a href="#the-code-container">Previous</a></div>

<p>GeSHi has the ability to add line numbers to your code (see the demo available at
<a href="http://qbnz.com/highlighter/demo.php">http://qbnz.com/highlighter/demo.php</a> to see what can be achieved). Line numbers are
a great way to make your code look professional, especially if you use the fancy
line numbers feature.</p>

<h5 id="enabling-line-numbers">3.2.1: Enabling Line Numbers</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#styling-line-numbers">Next</a> | <a href="#line-numbers">Previous</a></div>

<p>To highlight a source with line numbers, you call the <strong><tt>enable_line_numbers()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_line_numbers</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$flag</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where $flag is one of the following:</p>

<ul>
	<li><tt>GESHI_NORMAL_LINE_NUMBERS</tt> -  Use normal line numbering</li>
	<li><tt>GESHI_FANCY_LINE_NUMBERS</tt> -  Use fancy line numbering</li>
	<li><tt>GESHI_NO_LINE_NUMBERS</tt> -  Disable line numbers (default)</li>
</ul>

<p>Normal line numbers means you specify a style for them, and that style gets applied
to all of them. Fancy line numbers means that you can specify a different style
for each n<sup>th</sup> line number. You change the value of n (default 5):</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_line_numbers</span><span style="color: #66cc66;">&#40;</span>GESHI_FANCY_LINE_NUMBERS, <span style="color: #cc66cc;">37</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The second parameter is not used in any other mode. Setting it to 0 is the same as
simply using normal line numbers. Setting it to 1 applies the fancy style to every
line number.</p>

<div class="note"><div class="note-header">Note:</div><p>The values above are CONSTANTS - so don't put them in strings!</p></div>

<h5 id="styling-line-numbers">3.2.2  Styling Line Numbers</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#starting-line-numbers">Next</a> | <a href="#enabling-line-numbers">Previous</a></div>

<p>As of GeSHi 1.0.2, line numbers are added by the use of ordered lists. This solves
the old issues of line number styles inheriting from styles meant for the code. Also,
this solves an important issue about selecting code. For example, line numbers look
nice, but when you go to select the code in your browser to copy it? You got the line
numbers too! Not such a good thing, but thankfully this issue is now solved. What is
the price? Unfortunately the whole way that styles are inherited/used has changed for
those of you who were familiar with 1.0.1, and there is quite a bit more <acronym>HTML</acronym>
involved. So think carefully about these things before you enable line numbers.</p>

<p>Now, onto how to style line numbers:</p>

<p>Styles are set for line numbers using the <strong><tt>set_line_style()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'background: #fcfcfc;'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>If you're using Fancy Line Numbers mode, you pass a second string for the style
of the n<sup>th</sup> line number:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'background: #fcfcfc;'</span>, <span style="color: #ff0000;">'background: #f0f0f0;'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The second style will have no effect if you're not using Fancy Line Numbers mode.</p>

<p>By default, the styles you pass overwrite the current styles. Add a boolean "true"
after the styles you specify to combine them with the current styles:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'background: red;'</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;<br />

<span style="color: #808080; font-style: italic;">// or, for fancy line numbers</span><br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'background: red;'</span>, <span style="color: #ff0000;">'background: blue;'</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</code>

<div class="caution"><div class="caution-header">Caution:</div><p>When you set line number styles, the code will inherit those styles! This
is the main issue to come out of the 1.0.2 release. If you want your code to be styled in a predictable
manner, you'll have to call the <strong><tt>set_code_style()</tt></strong> method to rectify this problem.</p>

<p>Note also that you cannot apply background colours to line numbers unless you use <strong><tt>set_overall_style()</tt></strong>.
Here's how you'd style:</p>

<ol>
	<li>Use <strong><tt>set_overall_style()</tt></strong> to style the overall code block.
	For example, you can set the border style/colour, any margins and padding etc. using this
	method. <strong>In addition:</strong> set the background colour for all the line numbers
	using this method.</li>
	<li>Use <strong><tt>set_line_style()</tt></strong> to style the foreground of the line
	numbers. For example, you can set the colour, weight, font, padding etc. of the line
	numbers using this method.</li>
	<li>Use <strong><tt>set_code_style()</tt></strong> to explicitly override the styles
	you set for line numbers using <strong><tt>set_line_style</tt></strong>. For example,
	if you'd set the line numbers to be bold (or even if you'd only set the fancy line number
	style to be bold), and you didn't actually want your code to be bold, you'd make sure
	that <tt>font-weight: normal;</tt> was in the stylesheet rule you passed to <strong><tt>set_code_style</tt></strong></li>
</ol>

<p>This is the one major change from GeSHi 1.0.1 - make sure you become familiar with this, and make
sure that you check any code you have already styled with 1.0.1 when you upgrade to make sure nothing
bad happens to it.</p></div>

<h5 id="starting-line-numbers">3.2.3: Choosing a Start Number</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#using-css-classes">Next</a> | <a href="#styling-line-numbers">Previous</a></div>

<p>As of GeSHi 1.0.2, you can now make the line numbers start at any number, rather than just 1. This feature
is useful if you're highlighting code from a file from around a certain line number in that file, as an additional
guide to those who will view the code. You set the line numbers by calling the <strong><tt>start_line_numbers_at()</tt></strong>
method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">start_line_numbers_at</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$number</span><span style="color: #66cc66;">&#41;</span>;</code>

<p><var>$number</var> must be a positive integer (or zero). If it is not, GeSHi will convert it anyway.</p>

<p>If you have not enabled line numbers, this will have no effect.</p>

<div class="caution"><div class="caution-header">Caution:</div><p>Although I'd like GeSHi to have XHTML strict compliance, this feature will break
compliancy (however transitional compliancy remains). This is because the only widely supported way to
change the start value for line numbers is by using the <strong>start="number"</strong> attribute of the
<tt>&lt;ol&gt;</tt> tag. Although CSS does provide a mechanism for doing this, it is only supported in
Opera versions 7.5 and above (not even Firefox supports this).</p></div>

<h4 id="using-css-classes">3.3: Using CSS Classes</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#enabling-css-classes">Next</a> | <a href="#starting-line-numbers">Previous</a></div>

<p>Using CSS to highlight your code instead of in-lining the styles is a definate
bonus. Not only is it more compliant (the w3c is deprecating the style attribute
in XHTML 2.0) but it results in far less outputted code - up to a whopping 50%
saving - which makes a *huge* difference to those of us on modems!</p>

<h5 id="enabling-css-classes">3.3.1: Enabling CSS Classes</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-css-class-id">Next</a> | <a href="#using-css-classes">Previous</a></div>

<p>By default, GeSHi doesn't use the classes, so it's easy just to whack out some
highlighted code if you need without worrying about stylesheets. However, if you're
a bit more organised about it, you should use the classes ;). To turn the use of
classes on, you call the <strong><tt>enable_classes()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>If you want to turn classes OFF for some reason later:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;

<p>If classes are enabled when <strong><tt>parse_code()</tt></strong> is called, then the resultant source will
use CSS classes in the output, otherwise it will in-line the styles. The advantages
of using classes are great - the reduction in source will be very noticeable, and
what's more you can use one stylesheet for several different highlights on the same
page. In fact, you can even use an external stylesheet and link to that, saving even
more time and source (because stylesheets are cached by browsers).</p>

<div class="caution"><div class="caution-header">Caution:</div><p>This should be the very first method you call after creating a new
GeSHi object! That way, various other methods can act upon your choice to use classes
correctly. In theory, you could call this method just before parsing the code, but this
may result in unexpected behaviour.</p></div>

<h5 id="setting-css-class-id">3.3.2: Setting the CSS class and ID</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#getting-stylesheet">Next</a> | <a href="#enabling-css-classes">Previous</a></div>

<p>You can set an overall CSS class and id for the code. This is a good feature
that allows you to use the same stylesheet for many different snippets of code.
You call <strong><tt>set_overall_class()</tt></strong> and <strong><tt>set_overall_id</tt></strong> to accomplish this:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_overall_class</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'mycode'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_overall_id</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'dk48ck'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The default classname is the name of the language being used. This means you can use
just the one stylesheet for all sources that use the same language, and incidentally
means that you probably won't have to call these methods too often.</p>

<p>CSS IDs are supposed to be unique, and you should use them as such. Basically, you can
specify an ID for your code and then use that ID to highlight that code in a unique way.
You'd do this for a block of code that you expressly wanted to be highlighted in a
different way (see the section below on gettting the stylesheet for your code for an example).</p>

<h5 id="getting-stylesheet">3.3.3: Getting the stylesheet for your code</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#using-an-external-stylesheet">Next</a> | <a href="#setting-css-class-id">Previous</a></div>

<p>The other half of using CSS classes is getting the stylesheet for use with the classes.
GeSHi makes it very easy to get a stylesheet for your code, with one easy method call:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #808080; font-style: italic;">// Here we have code that will spit out a header for</span><br />
<span style="color: #808080; font-style: italic;">// a stylesheet. For example:</span><br />
<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;html&gt;<br />
&lt;head&gt;&lt;title&gt;Code&lt;/title&gt;<br />
&lt;style type=&quot;text/css&quot;&gt;<br />

&lt;!--'</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Echo out the stylesheet for this code block</span><br />
<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">get_stylesheet</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// And continue echoing the page</span><br />

<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'--&gt;<br />
&lt;/style&gt;&lt;/head&gt;<br />
&lt;body&gt;'</span>; </code>

<p>The <strong><tt>get_stylesheet()</tt></strong> method gets the stylesheet for your code in one easy call. All you
need to do is output it in the correct place. As you can also see, you don't even have
to enable class usage to get the stylesheet nessecary either - however not enabling
classes but using the stylesheet may result in problems later.</p>

<p>By default, <strong><tt>get_stylesheet()</tt></strong> tries to echo the least amount of code possible. Although
currently it doesn't check to see if a certain lexic is even in the source, you can
expect this feature in the future. At least for the present however, if you explicitly
disable the highlighting of a certain lexic, or disable line numbers, the related CSS
will not be outputted. This may be a bad thing for you perhaps you're going to use
the stylesheet for many blocks of code, some with line numbers, others with some lexic
enabled where this source has it disabled. Or perhaps you're building an external stylesheet
and want all lexics included. So to get around this problem, you do this:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">get_stylesheet</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>This turns economy mode off, and all of the stylesheet will be outputted regardless.</p>

<p>Now lets say you have several snippets of code, using the same language. In most of them
you don't mind if they're highlighted the same way (in fact, that's exactly what you want)
but in one of them you'd like the source to be highlighted differently. Here's how you
can do that:</p>

<code><span style="color: #808080; font-style: italic;">// assume path is the default &quot;geshi/&quot; relative to the current directory</span><br />

<span style="color: #0000ff;">$geshi1</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source1</span>, <span style="color: #0000ff;">$lang</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi2</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source2</span>, <span style="color: #0000ff;">$lang</span><span style="color: #66cc66;">&#41;</span>;<br />

<span style="color: #0000ff;">$geshi3</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source3</span>, <span style="color: #0000ff;">$lang</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Turn classes on for all sources</span><br />
<span style="color: #0000ff;">$geshi1</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />

<span style="color: #0000ff;">$geshi2</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi3</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Make $geshi3 unique</span><br />
<span style="color: #0000ff;">$geshi3</span>-&gt;<span style="color: #006600;">set_overall_id</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'different'</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">// Methods are called on $geshi3 to change styles...</span><br />
<span style="color: #808080; font-style: italic;">//</span><br />
<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;html&gt;<br />
&lt;head&gt;&lt;title&gt;Code&lt;/title&gt;<br />

&lt;style type=&quot;text/css&quot;&gt;<br />
&lt;!--<br />
'</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Get the nessecary stylesheets</span><br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi1</span>-&gt;<span style="color: #006600;">get_stylesheet</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />

<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi3</span>-&gt;<span style="color: #006600;">get_stylesheet</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'--&gt;<br />
&lt;/style&gt;&lt;/head&gt;<br />
&lt;body&gt;'</span>;<br />

<br />
<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Code snippet 1:'</span>;<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi1</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Code snippet 2 (same highlighting as 1):'</span>;<br />

<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi2</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Code snippet 3 (DIFFERENT highlighting):'</span>;<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi3</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;/body&gt;&lt;/html&gt;'</span>;</code>

<p>Before version 1.0.2, you needed to set the class of the code you wanted to be
unique to the empty string. This limitation has been removed in version 1.0.2 - if
you set the ID of a block of code, all styling will be done based on that ID alone.</p>

<h5 id="using-an-external-stylesheet">3.3.4: Using an External Stylesheet</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#changing-styles">Next</a> | <a href="#getting-stylesheet">Previous</a></div>

<p>An external stylesheet can reduce even more the amount of code needed to highlight
some source. However there are some drawbacks with this. To use an external stylesheet,
it's up to you to link it in to your document, normally with the following HTML:</p>

<code><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">"stylesheet"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/css"</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"url_to_stylesheet.css"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></span></code>

<p>In your external stylesheet you put CSS declarations for your code. Then just make sure
you're using the correct class (use <strong><tt>set_overall_class()</tt></strong> to ensure this) and this should
work fine.</p>

<p>This method is great if you don't mind the source always being highlighted the same (in particular,
if you're making a plugin for a forum/wiki/other system, using an external stylesheet is a good idea!).
It saves a small amount of code and your bandwidth, and it's relatively easy to just change
the stylesheet should you need to. However, using this will render the methods that
change the styles of the code useless, because of course the stylesheet is no longer being
dynamically generated. You can still disable highlighting of certain lexics dynamically,
however.</p>

<div class="note"><div class="note-header">Note:</div><p>As of version 1.0.2, GeSHi comes with a <tt>contrib/</tt> directory, which in it contains
a "wizard" script for creating a stylesheet. Although this script is by no means a complete solution,
it will create the necessary rules for the basic lexics - comments, strings for example. Things
not included in the wizard include regular expressions for any language that uses them (PHP and XML
are two languages that use them), and keyword-link styles. However, this script should take some of
the tedium out of the job of making an external stylesheet. Expect a much better version of this
script in version 1.2!</p></div>

<h4 id="changing-styles">3.4: Changing Styles</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#the-overall-styles">Next</a> | <a href="#using-an-external-stylesheet">Previous</a></div>

<p>One of the more powerful features of GeSHi is the ability to change the style of the
output dynamically. Why be chained to the boring styles the language authors make up?
You can change almost every single aspect of highlighted code - and can even say whether
something is to be highlighted at all.</p>

<p>If you're confused about &quot;styles&quot;, you probably want to have a quick tutorial in them
so you know what you can do with them. Checkout the homepage of CSS at <a href="http://www.w3.org/Style/CSS">http://www.w3.org/Style/CSS</a>.</p>

<h5 id="the-overall-styles">3.4.1: The Overall Styles</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#line-number-styles">Next</a> | <a href="#changing-styles">Previous</a></div>

<p>The code outputted by GeSHi is either in a <tt>&lt;div&gt;</tt> or a <tt>&lt;pre&gt;</tt> (see the section entitled
&quot;The Code Container&quot;), and this can be styled.</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_overall_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'... styles ...'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where styles is a string containing valid CSS declarations. By default, these styles
overwrite the current styles, but you can change this by adding a second parameter:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_overall_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'color: blue;'</span>, <span style="font-weight: bold; color: #000;">true</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The default styles &quot;shine through&quot; wherever anything isn't highlighted. Also, you can
apply more advanced styles, like position: (fixed|relative) etc, because a <tt>&lt;div&gt;</tt>/<tt>&lt;pre&gt;</tt>
is a block level element.</p>

<div class="note"><div class="note-header">Note:</div><p>Remember that a <tt>&lt;div&gt;</tt> will by default have a larger font size than a <tt>&lt;pre&gt;</tt>,
as discussed in the section &quot;<a href="#the-code-container">The Code Container</a>&quot;.</p></div>

<h5 id="line-number-styles">3.4.2: Line Number Styles</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-keyword-styles">Next</a> | <a href="#the-overall-styles">Previous</a></div>

<p>You may wish to refer to the section <a href="#styling-line-numbers">Styling Line Numbers</a> before
reading this section.</p>

<p>As of version 1.0.2, the way line numbers are generated is different, so therefore the way
that they are styled is different. In particular, now you cannot set the background style of
the fancy line numbers to be different from that of the normal line numbers.</p>

<p>Line number styles are set by using the method <strong><tt>set_line_style</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$style1</span>, <span style="color: #0000ff;">$style2</span><span style="color: #66cc66;">&#41;</span>;</code>

<p><var>$style1</var> is the style of the line numbers by default, and <var>$style2</var> is the style of the
fancy line numbers.</p>

<div class="caution"><div class="caution-header">Caution:</div><p>Things have changed since 1.0.1! This note is <strong>very</strong> important -
please make sure you check this twice before complaining about line numbers!</p>

<p>Because of the way that ordered lists are done in HTML, there really isn't normally a way
to style the actual <em>numbers</em> in the list. I've cheated somewhat with GeSHi - I've made it
possible to use CSS to style the <em>foreground</em> of the line numbers. So therefore, you
can change the color, font size and type, and padding on them. If you want to have a pretty
background, you <strong>must</strong> use <strong><tt>set_overall_style()</tt></strong> to do
this, and use <strong><tt>set_code_style()</tt></strong> to style the actual code! This is
explained in the section above: <a href="#styling-line-numbers">Styling Line Numbers</a>.</p>

<p>In addition, the styles for fancy line numbers <em>is now the difference between the normal
styles and the styles you want to achieve</em>. For example, in GeSHi prior to 1.0.2 you may
have done this to style line numbers:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'color: red; font-weight: bold;'</span>, <span style="color: #ff0000;">'color: green; font-weight: bold'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Now you instead can do this:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_line_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'color: red; font-weight: bold;'</span>, <span style="color: #ff0000;">'color: green;'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The <tt>font-weight: bold;</tt> will automatically carry through to the fancy styles. This is
actually a small saving in code - but the difference may be confusing for anyone using 1.0.1 at first.</p></div>

<h5 id="setting-keyword-styles">3.4.3: Setting Keyword Styles</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-comment-styles">Next</a> | <a href="#line-number-styles">Previous</a></div>

<p>Perhaps the most regular change you will make will be to the styles of a keyword set. In
order to change the styles for a particular set, you'll have to know what the set is
called first. Sets are numbered from 1 up. Typically, set 1 contains keywords like if,
while, do, for, switch etc, set 2 contains null, false, true etc, set 3 contains
function inbuilt into the language (<tt>echo</tt>, <tt>htmlspecialchars</tt> etc. in PHP) and set 4 contains
data types and similar variable modifiers: int, double, real, static etc. However
these things are not fixed, and you should check the language file to see what key
you want. Having a familiarity with a language file is definately a plus for using it.</p>

<p>To change the styles for a keyword set, call the set_keyword_group_style() method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_keyword_group_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$group</span>, <span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$group</var> is the group to change the styles for and <var>$styles</var> is a string containing
the styles to apply to that group.</p>

<p>By default, the styles you pass overwrite the current styles. Add a boolean "true"
after the styles you specify to combine them with the current styles:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_keyword_group_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #ff0000;">'color: white;'</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</code>

<h5 id="setting-comment-styles">3.4.4: Setting Comment Styles</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-other-styles">Next</a> | <a href="#setting-keyword-styles">Previous</a></div>

<p>To change the styles for a comment group, call the <strong><tt>set_comments_style()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_comments_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$group</span>, <span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$group</var> is either a number corresponding to a single-line comment, or the string
<span style="color: #f00;"><tt>'MULTI'</tt></span> to specify multiline comments:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_comments_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">'font-style: italic;'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_comments_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'MULTI'</span>, <span style="color: #ff0000;">'display: hidden;'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>By default, the styles you pass overwrite the current styles. Add a boolean "true"
after the styles you specify to combine them with the current styles:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_comments_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">'font-weight: 100;'</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</code>

<h5 id="setting-other-styles">3.4.5: Setting Other Styles</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#auto-caps-nocaps">Next</a> | <a href="#setting-comment-styles">Previous</a></div>

<p>GeSHi can highlight many other aspects of your source other than just keywords and
comments. Strings, Numbers, Methods and Brackets among other things can all also be
highlighted. Here are the related methods:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_escape_characters_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#91;</span>, <span style="color: #0000ff;">$preserve_defaults</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_symbols_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#91;</span>, <span style="color: #0000ff;">$preserve_defaults</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<br />

<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_strings_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#91;</span>, <span style="color: #0000ff;">$preserve_defaults</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_numbers_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#91;</span>, <span style="color: #0000ff;">$preserve_defaults</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_methods_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span>, <span style="color: #0000ff;">$styles</span>, <span style="color: #66cc66;">&#91;</span>, <span style="color: #0000ff;">$preserve_defaults</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</code>

<p><var>$styles</var> is a string containing valid stylesheet declarations, while <var>$preserve_defaults</var>
should be set to true if you want your styles to be merged with the previous styles. In the case of <strong><tt>set_methods_style</tt></strong>,
you should select a group to set the styles of, check the language files for the number used for each &quot;object splitter&quot;.</p>

<h4 id="case-caps">3.5: Case Sensitivity and Auto Casing</h3>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#auto-caps-nocaps">Next</a> | <a href="#setting-other-styles">Previous</a></div>

<p>Controlling the case of the outputted source is an easy job with GeSHi. You can control which keywords are converted in case, and also control whether
keywords are checked in a case sensitive manner.</p>

<h5 id="auto-caps-nocaps">3.5.1: Auto-Caps/Nocaps</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-case-sensitivity">Next</a> | <a href="#case-caps">Previous</a></div>

<p>Auto-Caps/Nocaps is a nifty little feature that capitalises or lowercases automatically
certain lexics when they are styled. I dabble in QuickBASIC, a dialect of BASIC which is well
known for it's capatalisation, and SQL is another language well known for using caps
for readability.</p>

<p>To change what case lexics are rendered in, you call the <strong><tt>set_case_keywords()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_case_keywords</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$caps_modifier</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The valid values to pass to this method are:</p>

<ul>
	<li><tt>GESHI_CAPS_NO_CHANGE</tt> - Don't change the case of any lexics, leave as they are found</li>
	<li><tt>GESHI_CAPS_UPPER</tt> - Uppercase all lexics found</li>
	<li><tt>GESHI_CAPS_LOWER</tt> - Lowercase all lexics found</li>
</ul>

<div class="caution"><div class="caution-header">Caution:</div><p>When I say &quot;lexic&quot;, I mean &quot;keywords&quot;. <strong>Any</strong> keyword in <strong>any</strong> keyword
array will be modified using this option! This is one small area of inflexibility I hope to fix in 1.2.X.</p></div>

<p>I suspect this will only be used to specify <tt>GESHI_CAPS_NO_CHANGE</tt> to turn off autocaps
for languages like SQL and BASIC variants, like so:</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'sql'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_case_keywords</span><span style="color: #66cc66;">&#40;</span>GESHI_CAPS_NO_CHANGE<span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// don't want keywords capatalised </span></code>

<p>All the same, it can be used for some interesting effects:</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'java'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Anyone who's used java knows how picky it is about CapitalLetters...</span><br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_case_keywords</span><span style="color: #66cc66;">&#40;</span>GESHI_CAPS_LOWER<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// No *way* the source will look right now ;) </span></code>

<h5 id="setting-case-sensitivity">3.5.2: Setting Case Sensitivity</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#changing-config">Next</a> | <a href="#auto-caps-nocaps">Previous</a></div>

<p>Some languages, like PHP, don't mind what case function names and keywords are in, while others, like Java, depend
on such pickiness to maintain their bad reputations ;). In any event, you can use the <strong><tt>set_case_sensitivity</tt></strong>
to change the case sensitiveness of a particular keyword group from the default:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_case_sensitivity</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span>, <span style="color: #0000ff;">$sensitivity</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$key</var> is the key of the group for which you wish to change case sensitivness for (see the language file for that language), and
<var>$sensitivity</var> is a boolean value - <strong>true</strong> if the keyword is case sensitive, and <strong>false</strong> if not.</p>

<h4 id="changing-config">3.6: Changing the Source, Language, Config Options</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#changing-the-source">Next</a> | <a href="#setting-case-sensitivity">Previous</a></div>

<p>What happens if you want to change the source to be highlighted on the fly, or the
language. Or if you want to specify any of those basic fields after you've created
a GeSHi object? Well, that's where these methods come in.</p>

<h5 id="changing-the-source">3.6.1: Changing the Source Code</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#changing-the-language">Next</a> | <a href="#changing-config">Previous</a></div>

<p>To change the source code, you call the <strong><tt>set_source()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_source</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$newsource</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Example:</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source1</span>, <span style="color: #ff0000;">'php'</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #808080; font-style: italic;">// Method calls to specify various options...</span><br />
<br />
<span style="color: #0000ff;">$code1</span> = <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_source</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source2</span><span style="color: #66cc66;">&#41;</span>;<br />

<span style="color: #0000ff;">$code2</span> = <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code>

<h5 id="changing-the-language">3.6.2: Changing the Language</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#changing-the-path">Next</a> | <a href="#changing-the-source">Previous</a></div>

<p>What happens if you want to change the language used for highlighting? Just call
<strong><tt>set_language()</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_language</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'newlanguage'</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Example:</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'php'</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #0000ff;">$code</span> = <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Highlight GeSHi's output</span><br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_source</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$code</span><span style="color: #66cc66;">&#41;</span>;<br />

<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_language</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'html4strict'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_classes</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code>

<div class="note"><div class="note-header">Note:</div><p>Names are case-insensitive - they will be converted to lower case to match a language
file however. So if you're making a language file, remember it should have a name in lower case.</p></div>

<div class="note"><div class="note-header">Note:</div><p>What you pass to this method is the name of a language file, minus the .php extension. If you're
writing a plugin for a particular application, it's up to you to somehow convert user input into a valid language
name.</p></div>

<div class="caution"><div class="caution-header">Caution:</div><p>GeSHi <strong><tt>include()</tt></strong>s the language file, so be careful to make sure
that users can't pass some wierd language name to include any old script! GeSHi tries to strip non-valid characters
out of a language name, but you should always do this your self anyway. In particular, language files are always
lower-case, with either alphanumeric characters, dashes or underscores in their name.</p>

<p>At the very least, strip &quot;/&quot; characters out of a language name.</p></div>

<h5 id="changing-the-path">3.6.3: Changing the Language Path</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#changing-the-charset">Next</a> | <a href="#changing-the-language">Previous</a></div>

<p>What happens if all of a sudden you want to use language files from a different
directory from the current language file location? You call the <strong><tt>set_language_path()</tt></strong>
method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_language_path</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$newpath</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>It doesn't matter whether the path has a trailing slash after it or not - only that
it points to a valid folder. If it doesn't, that's your tough luck ;)</p>

<h5 id="changing-the-charset">3.6.4: Changing the Character Set</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#error-handling">Next</a> | <a href="#changing-using-load-from-file">Previous</a></div>

<p>As of version 1.0.3, you can use the method <strong><tt>set_encoding</tt></strong> to specify the character set that your
source is in. Valid names are those names that are valid for the PHP function <tt><a href="http://www.php.net/htmlentities">htmlentities()</a></tt>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_encoding</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$encoding</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>There is a table of valid strings for <var>$encoding</var> at the php.net manual linked to above. If you do not specify an encoding, or specify an
invalid encoding, the character set used is ISO-8859-1.</p>

<h5 id="changing-using-load-from-file">Using <tt>load_from_file</tt> to Change the Language and Source Code</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#error-handling">Next</a> | <a href="#changing-the-charset">Previous</a></div>

<p>As of GeSHi 1.0.5, you can use the method <strong><tt>load_from_file</tt></strong> to load the source code and language from a file. Simply pass
this method a file name and it will attempt to load the source and set the language.</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">load_from_file</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$file_name</span>, <span style="color: #0000ff;">$lookup</span><span style="color: #66cc66;">&#41;</span>;</code>

<p><var>$file_name</var> is the file name to use, and <var>$lookup</var> is an optional parameter that contains a lookup array to use for
deciding which language to choose. You can use this to override GeSHi's default lookup array, which may not contain the extension of the file
you're after, or perhaps does have your extension but under a different language. The lookup array is of the form:</p>

<pre>array(
	 *   'lang_name' => array('extension', 'extension', ...),
	 *   'lang_name' ...
	 * );</pre>

<p>Also, you can use the method <strong><tt>get_language_name_from_extension</tt></strong> if you need to convert a file extension to a valid language name.
This method will return the empty string if it could not find a match in the lookup, and like <strong><tt>load_from_file</tt></strong> it accepts an
optional second parameter that contains a lookup array.</p>

<h4 id="error-handling">3.7: Error Handling</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#disabling-lexics">Next</a> | <a href="#changing-using-load-from-file">Previous</a></div>

<p>What happens if you try to highlight using a language that doesn't exist? Or if GeSHi can't read a required file? The results
you get may be confusing. You may check your code over and over, and never find anything wrong. GeSHi provides ways of finding
out if GeSHi itself found anything wrong with what you tried to do. After highlighting, you can call the <strong><tt>error()</tt></strong>
method:</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'hi'</span>, <span style="color: #ff0000;">'thisLangIsNotSupported'</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">error</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <span style="color: #808080; font-style: italic;">// echoes error message</span><br />

<p>The error message you will get will look like this:</p>

<blockquote>GeSHi Error: GeSHi could not find the language thisLangIsNotSupported (using path geshi/) (code 2)</blockquote>

<p>The error outputted will be the last error GeSHi came across, just like how <tt>mysql_error()</tt> works.</p>

<h4 id="disabling-lexics">3.8: Disabling styling of some Lexics</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-tab-width">Next</a> | <a href="#error-handling">Previous</a></div>

<p>One disadvantage of GeSHi is that for large source files using complex languages, it can be quite slow with every option
turned on. Although future releases will concentrate on the speed/resource side of highlighting, for now you can gain
speed increases by disabling some of the highlighting options. This is done by using a series of set_*_highlighting methods:</p>

<ul>
	<li><strong><tt>set_keyword_group_highlighting(<var>$group</var>, <var>$flag</var>):</tt></strong> Sets whether a particular
	<var>$group</var> of keywords is to be highlighted or not. Consult the necessary language file(s) to see what <var>$group</var>
	should be for each group (typically a positive integer). <var>$flag</var> is <strong>false</strong> if you want to disable highlighting
	of this group, and <strong>true</strong> if you want to re-enable higlighting of this group. If you disable a keyword group then
	even if the keyword group has a related URL one will not be generated for that keyword.</li>
	<li><strong><tt>set_comments_highlighting(<var>$group</var>, <var>$flag</var>):</tt></strong> Sets whether a particular
	<var>$group</var> of comments is to be highlighted or not. Consult the necessary language file(s) to see what <var>$group</var>
	should be for each group (typically a positive integer, or the string 'MULTI' for multiline comments. <var>$flag</var> is
	<strong>false</strong> if you want to disable highlighting of this group, and <strong>true</strong> if you want to re-enable
	highlighting of this group.</li>
	<li><strong><tt>set_regexps_highlighting(<var>$regexp</var>, <var>$flag</var>):</tt></strong> Sets whether a particular
	<var>$regexp</var> is to be highlighted or not. Consult the necessary language file(s) to see what <var>$regexp</var>
	should be for each regexp (typically a positive integer, or the string 'MULTI' for multiline comments. <var>$flag</var> is
	<strong>false</strong> if you want to disable highlighting of this group, and <Strong>true</strong> if you want to re-enable
	highlighting of this group.</li>
	<li>The following methods:
	<ul>
		<li><strong><tt>set_escape_characters_highlighting(<var>$flag</var>)</tt></strong></li>
		<li><strong><tt>set_symbols_highlighting(<var>$flag</var>)</tt></strong></li>
		<li><strong><tt>set_strings_highlighting(<var>$flag</var>)</tt></strong></li>
		<li><strong><tt>set_numbers_highlighting(<var>$flag</var>)</tt></strong></li>
		<li><strong><tt>set_methods_highlighting(<var>$flag</var>)</tt></strong></li>
	</ul>
	Work on their respective lexics (e.g. set_methods_highlighting will disable/enable highlighting of methods). For each
	method, if <var>$flag</var> is <strong>false</strong> then the related lexics will not be highlighted at all (this
	means no HTML will surround the lexic like usual, saving on time and bandwidth.</li>
</ul>

<h4 id="setting-tab-width">3.9: Setting the Tab Width</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#using-strict-mode">Next</a> | <a href="#disabling-lexics">Previous</a></div>

<p>If you're using the <tt>&lt;pre&gt;</tt> header, tabs are handled automatically by your browser, and in general you can count on good results. However,
if you're using the <tt>&lt;div&gt;</tt> header, you may want to specify a tab width explicitly.</p>

<p>Note that tabs created in this fashion won't be like normal tabs - there won't be &quot;tab-stops&quot; as such, instead
tabs will be replaced with the specified number of spaces.</p>

<p>To change the tab width, you call the <strong><tt>set_tab_width()</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_tab_width</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$width</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$width</var> is the width in spaces that you'd like tabs to be.</p>

<h4 id="using-strict-mode">3.10: Using Strict Mode</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#adding-removing-keywords">Next</a> | <a href="#setting-tab-width">Previous</a></div>

<p>Some languages like to get tricky, and jump in and out of the file that they're in. For example, the vast majority of you reading
this will have used a PHP file. And you know that PHP code is only executed if it's within delimiters like &lt;?php and ?&gt; (there
are others of course...). So what happens if you do the following in a php file?</p>

<code>&lt;img src=&quot;&lt;?php echo rand(1, 100) ?&gt;&quot; /&gt;</code>

<p>Well normally using GeSHi with PHP, or using a bad highlighter, you'll end up with this:</p>

<code>&lt;img src=<span style="color: #ff0000;">"&lt;?php echo rand(1, 100) ?&gt;"</span> /&gt;</code>

<p>What a mess! Especially if you're being slack about where you're putting your quotes, you could end up with the rest of your
file as bright red. Fortunately, you can tell GeSHi to be &quot;strict&quot; about just when it highlights and when it does not,
using the <strong><tt>enable_strict_mode</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_strict_mode</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$mode</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$mode</var> is <strong>true</strong> or not specified to enable strict mode, or <strong>false</strong> to disable strict mode
if you've already turned it and don't want it now.</p>

<p>Here's the result: much better!</p>

<code>&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <a href="http://www.php.net/rand"><span style="color: #000066;">rand</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;</code>

<h4 id="adding-removing-keywords">3.11: Adding/Removing Keywords</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#adding-a-keyword">Next</a> | <a href="#using-strict-mode">Previous</a></div>

<p>Lets say that you're working on a large project, with many files, many classes and many functions. Perhaps also you have the source code
on the web and highlighted by GeSHi, perhaps as a front end to CVS, as a learning tool, something to refer to, whatever. Well, why not highlight
the names of the functions and classes *your* project uses, as well as the standard functions and classes? Or perhaps you're not interested in
highlighting certain functions, and would like to remove them? Or maybe you don't mind if an entire function group goes west in the interest
of speed? GeSHi can handle all of this!</p>

<h5 id="adding-a-keyword">3.11.1: Adding a Keyword</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#removing-a-keyword">Next</a> | <a href="#adding-removing-keywords">Previous</a></div>

<p>If you want to add a keyword to an existing keyword group, you use the <strong><tt>add_keyword</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">add_keyword</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span>, <span style="color: #0000ff;">$word</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$key</var> is the index of the group of keywords you want to add this keyword to, and <var>$word</var> is the word to add.</p>

<p>This implies knowledge of the language file to know the correct index.</p>

<div class="note"><div class="note-header">Note:</div><p>Keywords should contain at least two alphabetical characters (lower or upper case letters
only). This is to enable GeSHi to work much faster by not bothering to try to detect keywords in parts of your source where there is no alphabetical
characters.</div>

<h5 id="removing-a-keyword">3.11.2: Removing a Keyword</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#adding-a-keyword-group">Next</a> | <a href="#adding-a-keyword">Previous</a></div>

<p>Perhaps you want to remove a keyword from an existing group. Maybe you don't use it and want to save yourself some time. Whatever the
reason, you can remove it using the <strong><tt>remove_keyword</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">remove_keyword</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span>, <span style="color: #0000ff;">$word</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$key</var> is the index of the gropu of keywords that you want to remove this keyword from, and <var>$word</var> is the word to remove.</p>

<p>This implies knowledge of the language file to know the correct index - most of the time the keywords you'll want to remove will be in
group 3, but this is not guaranteed and you should check the language file first.</p>

<p>This function is silent - if the keyword is not in the group you specified, nothing awful will happen ;)</p>

<h5 id="adding-a-keyword-group">3.11.3: Adding a Keyword Group</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#removing-a-keyword-group">Next</a> | <a href="#removing-a-keyword">Previous</a></div>

<p>Lets say for your big project you have several main functions and classes that you'd like highlighted. Why not add them as their own group
instead of having them highlighted the same way as other keywords? Then you can make them stand out, and people can instantly see which functions
and classes are user defined or inbuilt. Furthermore, you could set the URL for this group to point at the API documentation of your project.</p>

<p>You add a keyword group by using the <strong><tt>add_keyword_group</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">add_keyword_group</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span>, <span style="color: #0000ff;">$styles</span>, <span style="color: #0000ff;">$case_sensitive</span>, <span style="color: #0000ff;">$words</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$key</var> is the key that you want to use to refer to this group, <var>$styles</var> is the styles that you want to
use to style this group, <var>$case_sensitive</var> is <strong>true</strong> or <strong>false</strong> depending on whether you want
this group of keywords to be case sensitive or not and <var>$words</var> is an array of words (or a string) of which words to add
to this group. For example:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">add_keyword_group</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>, <span style="color: #ff0000;">'color: #600000;'</span>, <span style="color: #000000; font-weight: bold;">false</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'myfunc_1'</span>, <span style="color: #ff0000;">'myfunc_2'</span>, <span style="color: #ff0000;">'myfunc_3'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Adds a keyword group referenced by index 10, of which all keywords in the group will be <span style="color: #600000;">dark red</span>,
each keyword can be in any case and which contains the keywords &quot;myfunc_1&quot;, &quot;myfunc_2&quot; and &quot;myfunc_3&quot;.</p>

<p>After creating such a keyword group, you may call other GeSHi methods on it, just as you would for any other keyword group.</p>

<div class="caution"><div class="caution-header">Caution:</div><p>If you specify a <var>$key</var> for which there is already a keyword
group, the old keyword group will be overwritten! Most language files don't use numbers larger than 5, so I recommend you play it
safe and use a number like 10 or 42.</div>

<h5 id="removing-a-keyword-group">3.11.4: Removing a Keyword Group</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#headers-and-footers">Next</a> | <a href="#adding-a-keyword-group">Previous</a></div>

<p>Perhaps you *really* need speed? Why not just remove an entire keyword group? GeSHi won't have to loop through each
keyword checking for its existance, saving much time. You removing a keyword group by using the <strong><tt>remove_keyword_group</tt></strong>
method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">remove_keyword_group</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$key</var> is the key of the group you wish to remove. This implies knowleged of the language file.</p>

<h4 id="headers-and-footers">3.12: Headers and Footers for Your Code</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#keyword-substitution">Next</a> | <a href="#removing-a-keyword-group">Previous</a></div>

<p>So you want to add some special information to the highlighted source? GeSHi can do that too! You can specify headers
and footers for your code, style them, and insert information from the highlighted source into your header or footer.</p>

<h5 id="keyword-substitution">3.12.1: Keyword Substitution</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-header-content">Next</a> | <a href="#headers-and-footers">Previous</a></div>

<p>In your header and footer, you can put special keywords that will be replaced with actual configuration values for
this GeSHi object. The keywords you can use are:</p>

<ul>
	<li><strong>&lt;TIME&gt;:</strong> Is replaced by the time it took for the <tt>parse_code</tt> method - i.e., how
	long it took for your code to be highlighted. The time is returned to three decimal places.</li>
	<li><strong>&lt;LANGUAGE&gt;:</strong> Is replaced by a nice, friendly version of the language name used to
	highlight this code.</li>
	<li><strong>&lt;VERSION&gt;:</strong> The GeSHi version used to highlight the code.</li>
</ul>

<h5 id="setting-header-content">3.12.2: Setting Header Content</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-footer-content">Next</a> | <a href="#keyword-substitution">Previous</a></div>

<p>The header for your code is a &lt;div&gt;, which is inside the containing block. Therefore, it is affected by
the method <strong><tt>set_overall_style</tt></strong>, and should contain the sort of HTML that belongs in a &lt;div&gt;.
You may use any HTML you like, and format it as an HTML document. You should use valid HTML - convert to entities
any quotemarks or angle brackets you want displayed. You set the header content using the method <strong><tt>set_header_content</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_header_content</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$content</var> is the HTML you want to use for the header.</p>

<h5 id="setting-footer-content">3.12.3: Setting Footer Content</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#styling-header-content">Next</a> | <a href="#setting-header-content">Previous</a></div>

<p>The footer for your code is a &lt;div&gt;, which is inside the containing block. Therefore, it is affected by
the method <strong><tt>set_overall_style</tt></strong>, and should contain the sort of HTML that belongs in a &lt;div&gt;.
You may use any HTML you like, and format it as an HTML document. You should use valid HTML - convert to entities
any quotemarks or angle brackets you want displayed. You set the footer content using the method <strong><tt>set_footer_content</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_footer_content</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$content</var> is the HTML you want to use for the footer.</p>

<h5 id="styling-header-content">3.12.4: Styling Header Content</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#styling-footer-content">Next</a> | <a href="#setting-footer-content">Previous</a></div>

<p>You can apply styles to the header content you have set with the <strong><tt>set_header_content_style</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_header_content_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$styles</var> is the stylesheet declarations you want to use to style the header content.</p>

<h5 id="styling-footer-content">3.12.5: Styling Footer Content</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#keyword-urls">Next</a> | <a href="#styling-header-content">Previous</a></div>

<p>You can apply styles to the footer content you have set with the <strong><tt>set_footer_content_style</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_footer_content_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$styles</var> is the stylesheet declarations you want to use to style the footer content.</p>

<h4 id="keyword-urls">3.13: Keyword URLs</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#setting-a-url">Next</a> | <a href="#styling-footer-content">Previous</a></div>

<p>As of version 1.0.2, GeSHi allows you to specify a URL for keyword groups. This URL is used by GeSHi to convert the
keywords in that group into URLs to appropriate documentation. And using <strong><tt>add_keyword_group</tt></strong> you
can add functions and classes from your own projects and use the URL functionality to provide a link to your own API
documentation.</p>

<h5 id="setting-a-url">3.13.1: Setting a URL for a Keyword Group</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#disabling-urls">Next</a> | <a href="#keyword-urls">Previous</a></div>

<p>To set the URL to be used for a keyword group, you use the <strong><tt>set_url_for_keyword_group</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_url_for_keyword_group</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$group</span>, <span style="color: #0000ff;">$url</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$group</var> is the keyword group you want to assign the URL for, and <var>$url</var> is the URL for this
group of keywords.</p>

<p>You may be wondering how to make each keyword in the group point to the correct URL. You do this by putting <tt>{FNAME}</tt>
in the URL at the correct place. For example, PHP makes it easy by linking www.php.net/function-name to the documentation for
that function, so the URL used is <tt>http://www.php.net/{FNAME}</tt>.</p>

<p>Of course, when you get to a language like Java, that puts its class documentation in related folders, it gets a little trickier
to work out an appropriate URL (see the Java language file!). I hope to provide some kind of redirection service at
the GeSHi website in the future.</p>

<h5 id="disabling-urls">3.13.2: Disabling a URL for a Keyword Group</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#styling-links">Next</a> | <a href="#setting-a-url">Previous</a></div>

<p>It's easy to disable a URL for a keyword group: Simply use the method <strong><tt>set_url_for_keyword_group</tt></strong> to pass an empty string
as the URL:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_url_for_keyword_group</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$group</span>, <span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span>;</code>

<h5 id="styling-links">3.13.3: Styling Links</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#using-targets">Next</a> | <a href="#disabling-urls">Previous</a></div>

<p>You can also style the function links. You can style their default status, hovered, active and visited status.
All of this is controlled by one method, <strong><tt>set_link_styles</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_link_styles</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$mode</span>, <span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$mode</var> is one of four values:</p>

<ul>
	<li><strong><tt>GESHI_LINK</tt>:</strong> The default style of the links.</li>
	<li><strong><tt>GESHI_HOVER</tt>:</strong> The style of the links when they have focus (the mouse is hovering
	over them).</li>
	<li><strong><tt>GESHI_ACTIVE</tt>:</strong> The style of the links when they are being clicked.</li>
	<li><strong><tt>GESHI_VISITED</tt>:</strong> The style of links that the user has already visited.</li>
</ul>

<p>And <var>$styles</var> is the stylesheet declarations to apply to the links.</p>

<h5 id="using-targets">3.13.4: Setting the Link Target</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#using-contextual-importance">Next</a> | <a href="#styling-links">Previous</a></div>

<p>Perhaps you want to set the target of link attributes, so the manual pages open in a new window? Use the <strong><tt>set_link_target</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_link_target</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$target</span>, <span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$target</var> is any valid (X)HTML target value - <tt>_blank</tt> or <tt>_top</tt> for example.</p>

<h4 id="using-contextual-importance">3.14: Using Contextual Importance</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#context-important-markers">Next</a> | <a href="#styling-links">Previous</a></div>

<div class="caution"><div class="caution-header">Caution:</div><p>This functionality is not only buggy, but is proving
very hard to implement in 1.1.X. Therefore, this functionality may well be <strong>removed</strong> in 1.2.0. You are
hereby warned!</div>

<h4 id="highlighting-special-lines-extra">3.15: Highlighting Special Lines &quot;Extra&quot;</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#specifying-lines-to-highlight-extra">Next</a> | <a href="#disabling-contextual-importance">Previous</a></div>

<p>An alternative (and more stable) method of highlighting code that is important is to use extra highlighting by line.
Although you may not know what line numbers contain the important lines, if you do this method is a much more flexible
way of making important lines stand out.</p>

<h5 id="specifying-lines-to-highlight-extra">3.15.1: Specifying the Lines to Highlight Extra</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#styles-for-highlighted-lines">Next</a> | <a href="#highlighting-special-lines-extra">Previous</a></div>

<p>To specify which lines to highlight extra, you past an array containing the line numbers to <strong><tt>highlight_lines_extra</tt></strong>:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">highlight_lines_extra</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>The array could be in the form <tt>array(2, 3, 4, 7, 12, 344, 4242)</tt>, made from a DB query, generated from looking
through the source for certain important things and working out what line those things are... however you get the line numbers,
the array should simply be an array of integers.</p>

<p>Here's an example, using the same source as before:</p>

<code><span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #808080; font-style: italic;">// Here we go again! This time we'll simply highlight the 8th line</span><br />
<span style="color: #808080; font-style: italic;">//</span><br />
<span style="color: #0000ff;">$source</span> = <span style="color: #ff0000;">'public int[][] product ( n, m )<br />
{<br />
&nbsp; int [][] ans = new int[n][m];<br />
&nbsp; for ( int i = 0; i &lt; n; i++ )<br />
&nbsp; {<br />
&nbsp; &nbsp; for ( int j = 0; i &lt; m; j++ )<br />

&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; ans[i][j] = i * j;<br />
&nbsp; &nbsp; }<br />
&nbsp; }<br />

&nbsp; return ans;<br />
}'</span>;<br />
<br />

<span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #ff0000;">'java'</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">highlight_lines_extra</span><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/array"><span style="color: #000060;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #8866ff;">8<span style="color: #66cc66;">&#41;</span></span><span style="color: #66cc66;">&#41;</span>;

<br />
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Which produces:</p>

<code><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> product <span style="color: #66cc66;">&#40;</span> n, m <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />

&nbsp; <span style="color: #993333;">int</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> ans = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>m<span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333;">int</span> i = <span style="color: #cc66cc;">0</span>; i &lt; n; i++ <span style="color: #66cc66;">&#41;</span><br />

&nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333;">int</span> j = <span style="color: #cc66cc;">0</span>; i &lt; m; j++ <span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
</code>
<div style="color: #cc0; background-color: #ffc;"><code>&nbsp; &nbsp; &nbsp; ans<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>j<span style="color: #66cc66;">&#93;</span> = i * j;<br /></code></div>
<code>&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">return</span> ans;<br />

<span style="color: #66cc66;">&#125;</span></code>

<p>What's more, as you can see the code on a highlighted line is still actually highlighted itself. </p>

<div class="note"><div class="note-header">Note:</div><p>As you can see, this is a little buggy, but that is because of HTML laws
(code elements should not contain div elements). This works just fine if you use line numbers.</div>

<h5 id="styles-for-highlighted-lines">3.15.2: Styles for the Highlighted Lines</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#adding-ids-to-each-line">Next</a> | <a href="#specifying-lines-to-highlight-extra">Previous</a></div>

<p>Again as with contextual importance, you're not chained to the yellow theme that is the default. You can use the
<strong><tt>set_highlight_lines_extra_style</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">set_highlight_lines_extra_style</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$styles</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$styles</var> is the stylesheet declarations that you want to apply to highlighted lines.</p>

<h4 id="adding-ids-to-each-line">3.16: Adding IDs to Each Line</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#getting-the-time-of-styling">Next</a> | <a href="#styles-for-highlighted-lines">Previous</a></div>

<p>Perhaps you're a javascript junkie? GeSHi provides a way to give each line an ID so you can access that line with
javascript, or perhaps just by plain CSS (though if you want to access lines by CSS you should use the method in the
previous section). To enable IDs you call the <strong><tt>enable_ids</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">enable_ids</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$flag</span><span style="color: #66cc66;">&#41;</span>;</code>

<p>Where <var>$flag</var> is <strong>true</strong> or not present to enable IDs, and <strong>false</strong> to disable them
again if you need.</p>

<p>The ID generated is in the form <tt>{overall-css-id}-{line-number}</tt>. So for example, if you set the overall
CSS id to be &quot;mycode&quot;, then the IDs for each line would by &quot;mycode-1&quot;, &quot;mycode-2&quot; etc.
If there is no CSS ID set, then the CSS class is used, but this isn't a good idea if you're going to have more than
one block of code on any one page.</p>

<h4 id="getting-the-time-of-styling">3.17: Getting the Time of Styling</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-files">Next</a> | <a href="#adding-ids-to-each-line">Previous</a></div>

<p>Once you've called <tt>parse_code</tt>, you can get the time it took to run the highlighting by calling the
<strong><tt>get_time</tt></strong> method:</p>

<code><span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$source</span>, <span style="color: #0000ff;">$language</span>, <span style="color: #0000ff;">$path</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #0000ff;">$code</span> = <a href="http://www.php.net/addslashes"><span style="color: #000066;">addslashes</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">parse_code</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0000ff;">$time</span> = <span style="color: #0000ff;">$geshi</span>-&gt;<span style="color: #006600;">get_time</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />

<br />
<span style="color: #808080; font-style: italic;">// do something with it</span><br />
<a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"INSERT INTO code VALUES ('$code', '$time')"</span><span style="color: #66cc66;">&#41;</span>;</code>


<h3 id="language-files">4: Language Files</a></h3>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-example">Next</a> | <a href="#">Previous</a></div>

<p>So now you know what features GeSHi offers, and perhaps you've even meddled with the source. Or perhaps
you'd like a language file for language X but it doesn't seem to be supported? Rubbish! GeSHi will highlight
anything, what do you think I coded this for? ^_^ You'll just have to learn how to make a language file
yourself. And I promise it's not too hard - and if you're here you're in the right place!</p>

<h4 id="language-file-example">4.1: An Example Language File</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-conventions">Next</a> | <a href="#language-files">Previous</a></div>

<p>Let's begin by looking at an example language file - the language file for the first language ever supported,
PHP.</p>

<pre><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #808080; font-style: italic;">/*************************************************************************************
 * php.php
 * --------
 * Author: Nigel McNie (hide@address.com)
 * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
 * Release Version: 1.0.2
 * CVS Revision Version: $<!---->Revision$
 * Date Started: 2004/06/20
 * Last Modified: $<!---->Date$
 *
 * PHP language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2004/XX/XX (1.0.2)
 *  -  Added URL support
 *  -  Added extra constants
 * 2004/08/05 (1.0.1)
 *  -  Added support for symbols
 * 2004/07/14 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/07/14)
 * -------------------------
 * * Make sure the last few function I may have missed
 *   (like eval()) are included for highlighting
 * * Split to several files - php4, php5 etc
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/</span>
&nbsp;
<span style="color: #0000ff;">$language_data</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a> <span style="color: #66cc66;">&#40;</span>
	<span style="color: #ff0000;">'LANG_NAME'</span> =&gt; <span style="color: #ff0000;">'PHP'</span>,
	<span style="color: #ff0000;">'COMMENT_SINGLE'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span> =&gt; <span style="color: #ff0000;">'//'</span>, <span style="color: #cc66cc;">2</span> =&gt; <span style="color: #ff0000;">'#'</span><span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'COMMENT_MULTI'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/*'</span> =&gt; <span style="color: #ff0000;">'*/'</span><span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'CASE_KEYWORDS'</span> =&gt; GESHI_CAPS_NO_CHANGE,
	<span style="color: #ff0000;">'QUOTEMARKS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"'"</span>, <span style="color: #ff0000;">'&quot;'</span><span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'ESCAPE_CHAR'</span> =&gt; <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span>,
	<span style="color: #ff0000;">'KEYWORDS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #cc66cc;">1</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'include'</span>, <span style="color: #ff0000;">'require'</span>, <span style="color: #ff0000;">'include_once'</span>, <span style="color: #ff0000;">'require_once'</span>,
			<span style="color: #ff0000;">'for'</span>, <span style="color: #ff0000;">'foreach'</span>, <span style="color: #ff0000;">'as'</span>, <span style="color: #ff0000;">'if'</span>, <span style="color: #ff0000;">'elseif'</span>, <span style="color: #ff0000;">'else'</span>, <span style="color: #ff0000;">'while'</span>, <span style="color: #ff0000;">'do'</span>, <span style="color: #ff0000;">'endwhile'</span>, <span style="color: #ff0000;">'endif'</span>, <span style="color: #ff0000;">'switch'</span>, <span style="color: #ff0000;">'case'</span>, <span style="color: #ff0000;">'endswitch'</span>,
			<span style="color: #ff0000;">'return'</span>, <span style="color: #ff0000;">'break'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #cc66cc;">2</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'null'</span>, <span style="color: #ff0000;">'__LINE__'</span>, <span style="color: #ff0000;">'__FILE__'</span>,
			<span style="color: #ff0000;">'false'</span>, <span style="color: #ff0000;">'&amp;lt;?php'</span>, <span style="color: #ff0000;">'?&amp;gt;'</span>, <span style="color: #ff0000;">'&amp;lt;?'</span>,
			<span style="color: #ff0000;">'&amp;lt;script language='</span>, <span style="color: #ff0000;">'&amp;lt;/script&amp;gt;'</span>,
			<span style="color: #ff0000;">'true'</span>, <span style="color: #ff0000;">'var'</span>, <span style="color: #ff0000;">'default'</span>,
			<span style="color: #ff0000;">'function'</span>, <span style="color: #ff0000;">'class'</span>, <span style="color: #ff0000;">'new'</span>,
			<span style="color: #ff0000;">'__FUNCTION__'</span>, <span style="color: #ff0000;">'__CLASS__'</span>, <span style="color: #ff0000;">'__METHOD__'</span>, <span style="color: #ff0000;">'PHP_VERSION'</span>,
			<span style="color: #ff0000;">'PHP_OS'</span>, <span style="color: #ff0000;">'DEFAULT_INCLUDE_PATH'</span>, <span style="color: #ff0000;">'PEAR_INSTALL_DIR'</span>, <span style="color: #ff0000;">'PEAR_EXTENSION_DIR'</span>,
			<span style="color: #ff0000;">'PHP_EXTENSION_DIR'</span>, <span style="color: #ff0000;">'PHP_BINDIR'</span>, <span style="color: #ff0000;">'PHP_LIBDIR'</span>, <span style="color: #ff0000;">'PHP_DATADIR'</span>, <span style="color: #ff0000;">'PHP_SYSCONFDIR'</span>,
			<span style="color: #ff0000;">'PHP_LOCALSTATEDIR'</span>, <span style="color: #ff0000;">'PHP_CONFIG_FILE_PATH'</span>, <span style="color: #ff0000;">'PHP_OUTPUT_HANDLER_START'</span>, <span style="color: #ff0000;">'PHP_OUTPUT_HANDLER_CONT'</span>,
			<span style="color: #ff0000;">'PHP_OUTPUT_HANDLER_END'</span>, <span style="color: #ff0000;">'E_ERROR'</span>, <span style="color: #ff0000;">'E_WARNING'</span>, <span style="color: #ff0000;">'E_PARSE'</span>, <span style="color: #ff0000;">'E_NOTICE'</span>,
			<span style="color: #ff0000;">'E_CORE_ERROR'</span>, <span style="color: #ff0000;">'E_CORE_WARNING'</span>, <span style="color: #ff0000;">'E_COMPILE_ERROR'</span>, <span style="color: #ff0000;">'E_COMPILE_WARNING'</span>, <span style="color: #ff0000;">'E_USER_ERROR'</span>,
			<span style="color: #ff0000;">'E_USER_WARNING'</span>, <span style="color: #ff0000;">'E_USER_NOTICE'</span>, <span style="color: #ff0000;">'E_ALL'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #cc66cc;">3</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'zlib_get_coding_type'</span>,<span style="color: #ff0000;">'zend_version'</span>,<span style="color: #ff0000;">'zend_logo_guid'</span>,<span style="color: #ff0000;">'yp_order'</span>,<span style="color: #ff0000;">'yp_next'</span>,
			<span style="color: #ff0000;">'yp_match'</span>,<span style="color: #ff0000;">'yp_master'</span>,<span style="color: #ff0000;">'yp_get_default_domain'</span>,<span style="color: #ff0000;">'yp_first'</span>,<span style="color: #ff0000;">'yp_errno'</span>,<span style="color: #ff0000;">'yp_err_string'</span>,
			<span style="color: #ff0000;">'yp_cat'</span>,<span style="color: #ff0000;">'yp_all'</span>,<span style="color: #ff0000;">'xml_set_unparsed_entity_decl_handler'</span>,<span style="color: #ff0000;">'xml_set_start_namespace_decl_handler'</span>,<span style="color: #ff0000;">'xml_set_processing_instruction_handler'</span>,<span style="color: #ff0000;">'xml_set_object'</span>,
			<span style="color: #ff0000;">'xml_set_notation_decl_handler'</span>,<span style="color: #ff0000;">'xml_set_external_entity_ref_handler'</span>,<span style="color: #ff0000;">'xml_set_end_namespace_decl_handler'</span>,<span style="color: #ff0000;">'xml_set_element_handler'</span>,<span style="color: #ff0000;">'xml_set_default_handler'</span>,<span style="color: #ff0000;">'xml_set_character_data_handler'</span>,
			<span style="color: #ff0000;">'xml_parser_set_option'</span>,<span style="color: #ff0000;">'xml_parser_get_option'</span>,<span style="color: #ff0000;">'xml_parser_free'</span>,<span style="color: #ff0000;">'xml_parser_create_ns'</span>,<span style="color: #ff0000;">'xml_parser_create'</span>,<span style="color: #ff0000;">'xml_parse_into_struct'</span>,
			<span style="color: #ff0000;">'xml_parse'</span>,<span style="color: #ff0000;">'xml_get_error_code'</span>,<span style="color: #ff0000;">'xml_get_current_line_number'</span>,<span style="color: #ff0000;">'xml_get_current_column_number'</span>,<span style="color: #ff0000;">'xml_get_current_byte_index'</span>,<span style="color: #ff0000;">'xml_error_string'</span>,
			<span style="color: #ff0000;">'wordwrap'</span>,<span style="color: #ff0000;">'wddx_serialize_vars'</span>,<span style="color: #ff0000;">'wddx_serialize_value'</span>,<span style="color: #ff0000;">'wddx_packet_start'</span>,<span style="color: #ff0000;">'wddx_packet_end'</span>,<span style="color: #ff0000;">'wddx_deserialize'</span>,
			<span style="color: #ff0000;">'wddx_add_vars'</span>,<span style="color: #ff0000;">'vsprintf'</span>,<span style="color: #ff0000;">'vprintf'</span>,<span style="color: #ff0000;">'virtual'</span>,<span style="color: #ff0000;">'version_compare'</span>,<span style="color: #ff0000;">'var_export'</span>,
			<span style="color: #ff0000;">'var_dump'</span>,<span style="color: #ff0000;">'utf8_encode'</span>,<span style="color: #ff0000;">'utf8_decode'</span>,<span style="color: #ff0000;">'usort'</span>,<span style="color: #ff0000;">'usleep'</span>,<span style="color: #ff0000;">'user_error'</span>,
			<span style="color: #ff0000;">'urlencode'</span>,<span style="color: #ff0000;">'urldecode'</span>,<span style="color: #ff0000;">'unserialize'</span>,<span style="color: #ff0000;">'unregister_tick_function'</span>,<span style="color: #ff0000;">'unpack'</span>,<span style="color: #ff0000;">'unlink'</span>,
			<span style="color: #ff0000;">'unixtojd'</span>,<span style="color: #ff0000;">'uniqid'</span>,<span style="color: #ff0000;">'umask'</span>,<span style="color: #ff0000;">'uksort'</span>,<span style="color: #ff0000;">'ucwords'</span>,<span style="color: #ff0000;">'ucfirst'</span>,
			<span style="color: #ff0000;">'uasort'</span>,<span style="color: #ff0000;">'trim'</span>,<span style="color: #ff0000;">'trigger_error'</span>,<span style="color: #ff0000;">'touch'</span>,<span style="color: #ff0000;">'token_name'</span>,<span style="color: #ff0000;">'token_get_all'</span>,
			<span style="color: #ff0000;">'tmpfile'</span>,<span style="color: #ff0000;">'time'</span>,<span style="color: #ff0000;">'textdomain'</span>,<span style="color: #ff0000;">'tempnam'</span>,<span style="color: #ff0000;">'tanh'</span>,<span style="color: #ff0000;">'tan'</span>,
			<span style="color: #ff0000;">'system'</span>,<span style="color: #ff0000;">'syslog'</span>,<span style="color: #ff0000;">'symlink'</span>,<span style="color: #ff0000;">'substr_replace'</span>,<span style="color: #ff0000;">'substr_count'</span>,<span style="color: #ff0000;">'substr'</span>,
			<span style="color: #ff0000;">'strval'</span>,<span style="color: #ff0000;">'strtr'</span>,<span style="color: #ff0000;">'strtoupper'</span>,<span style="color: #ff0000;">'strtotime'</span>,<span style="color: #ff0000;">'strtolower'</span>,<span style="color: #ff0000;">'strtok'</span>,
			<span style="color: #ff0000;">'strstr'</span>,<span style="color: #ff0000;">'strspn'</span>,<span style="color: #ff0000;">'strrpos'</span>,<span style="color: #ff0000;">'strrev'</span>,<span style="color: #ff0000;">'strrchr'</span>,<span style="color: #ff0000;">'strpos'</span>,
			<span style="color: #ff0000;">'strncmp'</span>,<span style="color: #ff0000;">'strncasecmp'</span>,<span style="color: #ff0000;">'strnatcmp'</span>,<span style="color: #ff0000;">'strnatcasecmp'</span>,<span style="color: #ff0000;">'strlen'</span>,<span style="color: #ff0000;">'stristr'</span>,
			<span style="color: #ff0000;">'stripslashes'</span>,<span style="color: #ff0000;">'stripcslashes'</span>,<span style="color: #ff0000;">'strip_tags'</span>,<span style="color: #ff0000;">'strftime'</span>,<span style="color: #ff0000;">'stream_wrapper_register'</span>,<span style="color: #ff0000;">'stream_set_write_buffer'</span>,
			<span style="color: #ff0000;">'stream_set_timeout'</span>,<span style="color: #ff0000;">'stream_set_blocking'</span>,<span style="color: #ff0000;">'stream_select'</span>,<span style="color: #ff0000;">'stream_register_wrapper'</span>,<span style="color: #ff0000;">'stream_get_meta_data'</span>,<span style="color: #ff0000;">'stream_filter_prepend'</span>,
			<span style="color: #ff0000;">'stream_filter_append'</span>,<span style="color: #ff0000;">'stream_context_set_params'</span>,<span style="color: #ff0000;">'stream_context_set_option'</span>,<span style="color: #ff0000;">'stream_context_get_options'</span>,<span style="color: #ff0000;">'stream_context_create'</span>,<span style="color: #ff0000;">'strcspn'</span>,
			<span style="color: #ff0000;">'strcoll'</span>,<span style="color: #ff0000;">'strcmp'</span>,<span style="color: #ff0000;">'strchr'</span>,<span style="color: #ff0000;">'strcasecmp'</span>,<span style="color: #ff0000;">'str_word_count'</span>,<span style="color: #ff0000;">'str_shuffle'</span>,
			<span style="color: #ff0000;">'str_rot13'</span>,<span style="color: #ff0000;">'str_replace'</span>,<span style="color: #ff0000;">'str_repeat'</span>,<span style="color: #ff0000;">'str_pad'</span>,<span style="color: #ff0000;">'stat'</span>,<span style="color: #ff0000;">'sscanf'</span>,
			<span style="color: #ff0000;">'srand'</span>,<span style="color: #ff0000;">'sqrt'</span>,<span style="color: #ff0000;">'sql_regcase'</span>,<span style="color: #ff0000;">'sprintf'</span>,<span style="color: #ff0000;">'spliti'</span>,<span style="color: #ff0000;">'split'</span>,
			<span style="color: #ff0000;">'soundex'</span>,<span style="color: #ff0000;">'sort'</span>,<span style="color: #ff0000;">'socket_writev'</span>,<span style="color: #ff0000;">'socket_write'</span>,<span style="color: #ff0000;">'socket_strerror'</span>,<span style="color: #ff0000;">'socket_shutdown'</span>,
			<span style="color: #ff0000;">'socket_setopt'</span>,<span style="color: #ff0000;">'socket_set_timeout'</span>,<span style="color: #ff0000;">'socket_set_option'</span>,<span style="color: #ff0000;">'socket_set_nonblock'</span>,<span style="color: #ff0000;">'socket_set_blocking'</span>,<span style="color: #ff0000;">'socket_set_block'</span>,
			<span style="color: #ff0000;">'socket_sendto'</span>,<span style="color: #ff0000;">'socket_sendmsg'</span>,<span style="color: #ff0000;">'socket_send'</span>,<span style="color: #ff0000;">'socket_select'</span>,<span style="color: #ff0000;">'socket_recvmsg'</span>,<span style="color: #ff0000;">'socket_recvfrom'</span>,
			<span style="color: #ff0000;">'socket_recv'</span>,<span style="color: #ff0000;">'socket_readv'</span>,<span style="color: #ff0000;">'socket_read'</span>,<span style="color: #ff0000;">'socket_listen'</span>,<span style="color: #ff0000;">'socket_last_error'</span>,<span style="color: #ff0000;">'socket_iovec_set'</span>,
			<span style="color: #ff0000;">'socket_iovec_free'</span>,<span style="color: #ff0000;">'socket_iovec_fetch'</span>,<span style="color: #ff0000;">'socket_iovec_delete'</span>,<span style="color: #ff0000;">'socket_iovec_alloc'</span>,<span style="color: #ff0000;">'socket_iovec_add'</span>,<span style="color: #ff0000;">'socket_getsockname'</span>,
			<span style="color: #ff0000;">'socket_getpeername'</span>,<span style="color: #ff0000;">'socket_getopt'</span>,<span style="color: #ff0000;">'socket_get_status'</span>,<span style="color: #ff0000;">'socket_get_option'</span>,<span style="color: #ff0000;">'socket_create_pair'</span>,<span style="color: #ff0000;">'socket_create_listen'</span>,
			<span style="color: #ff0000;">'socket_create'</span>,<span style="color: #ff0000;">'socket_connect'</span>,<span style="color: #ff0000;">'socket_close'</span>,<span style="color: #ff0000;">'socket_clear_error'</span>,<span style="color: #ff0000;">'socket_bind'</span>,<span style="color: #ff0000;">'socket_accept'</span>,
			<span style="color: #ff0000;">'sleep'</span>,<span style="color: #ff0000;">'sizeof'</span>,<span style="color: #ff0000;">'sinh'</span>,<span style="color: #ff0000;">'sin'</span>,<span style="color: #ff0000;">'similar_text'</span>,<span style="color: #ff0000;">'shuffle'</span>,
			<span style="color: #ff0000;">'show_source'</span>,<span style="color: #ff0000;">'shmop_write'</span>,<span style="color: #ff0000;">'shmop_size'</span>,<span style="color: #ff0000;">'shmop_read'</span>,<span style="color: #ff0000;">'shmop_open'</span>,<span style="color: #ff0000;">'shmop_delete'</span>,
			<span style="color: #ff0000;">'shmop_close'</span>,<span style="color: #ff0000;">'shm_remove_var'</span>,<span style="color: #ff0000;">'shm_remove'</span>,<span style="color: #ff0000;">'shm_put_var'</span>,<span style="color: #ff0000;">'shm_get_var'</span>,<span style="color: #ff0000;">'shm_detach'</span>,
			<span style="color: #ff0000;">'shm_attach'</span>,<span style="color: #ff0000;">'shell_exec'</span>,<span style="color: #ff0000;">'sha1_file'</span>,<span style="color: #ff0000;">'sha1'</span>,<span style="color: #ff0000;">'settype'</span>,<span style="color: #ff0000;">'setlocale'</span>,
			<span style="color: #ff0000;">'setcookie'</span>,<span style="color: #ff0000;">'set_time_limit'</span>,<span style="color: #ff0000;">'set_socket_blocking'</span>,<span style="color: #ff0000;">'set_magic_quotes_runtime'</span>,<span style="color: #ff0000;">'set_include_path'</span>,<span style="color: #ff0000;">'set_file_buffer'</span>,
			<span style="color: #ff0000;">'set_error_handler'</span>,<span style="color: #ff0000;">'session_write_close'</span>,<span style="color: #ff0000;">'session_unset'</span>,<span style="color: #ff0000;">'session_unregister'</span>,<span style="color: #ff0000;">'session_start'</span>,<span style="color: #ff0000;">'session_set_save_handler'</span>,
			<span style="color: #ff0000;">'session_set_cookie_params'</span>,<span style="color: #ff0000;">'session_save_path'</span>,<span style="color: #ff0000;">'session_register'</span>,<span style="color: #ff0000;">'session_regenerate_id'</span>,<span style="color: #ff0000;">'session_name'</span>,<span style="color: #ff0000;">'session_module_name'</span>,
			<span style="color: #ff0000;">'session_is_registered'</span>,<span style="color: #ff0000;">'session_id'</span>,<span style="color: #ff0000;">'session_get_cookie_params'</span>,<span style="color: #ff0000;">'session_encode'</span>,<span style="color: #ff0000;">'session_destroy'</span>,<span style="color: #ff0000;">'session_decode'</span>,
			<span style="color: #ff0000;">'session_cache_limiter'</span>,<span style="color: #ff0000;">'session_cache_expire'</span>,<span style="color: #ff0000;">'serialize'</span>,<span style="color: #ff0000;">'sem_remove'</span>,<span style="color: #ff0000;">'sem_release'</span>,<span style="color: #ff0000;">'sem_get'</span>,
			<span style="color: #ff0000;">'sem_acquire'</span>,<span style="color: #ff0000;">'rtrim'</span>,<span style="color: #ff0000;">'rsort'</span>,<span style="color: #ff0000;">'round'</span>,<span style="color: #ff0000;">'rmdir'</span>,<span style="color: #ff0000;">'rewinddir'</span>,
			<span style="color: #ff0000;">'rewind'</span>,<span style="color: #ff0000;">'restore_include_path'</span>,<span style="color: #ff0000;">'restore_error_handler'</span>,<span style="color: #ff0000;">'reset'</span>,<span style="color: #ff0000;">'rename'</span>,<span style="color: #ff0000;">'register_tick_function'</span>,
			<span style="color: #ff0000;">'register_shutdown_function'</span>,<span style="color: #ff0000;">'realpath'</span>,<span style="color: #ff0000;">'readlink'</span>,<span style="color: #ff0000;">'readgzfile'</span>,<span style="color: #ff0000;">'readfile'</span>,<span style="color: #ff0000;">'readdir'</span>,
			<span style="color: #ff0000;">'read_exif_data'</span>,<span style="color: #ff0000;">'rawurlencode'</span>,<span style="color: #ff0000;">'rawurldecode'</span>,<span style="color: #ff0000;">'range'</span>,<span style="color: #ff0000;">'rand'</span>,<span style="color: #ff0000;">'rad2deg'</span>,
			<span style="color: #ff0000;">'quotemeta'</span>,<span style="color: #ff0000;">'quoted_printable_decode'</span>,<span style="color: #ff0000;">'putenv'</span>,<span style="color: #ff0000;">'proc_open'</span>,<span style="color: #ff0000;">'proc_close'</span>,<span style="color: #ff0000;">'printf'</span>,
			<span style="color: #ff0000;">'print_r'</span>,<span style="color: #ff0000;">'prev'</span>,<span style="color: #ff0000;">'preg_split'</span>,<span style="color: #ff0000;">'preg_replace_callback'</span>,<span style="color: #ff0000;">'preg_replace'</span>,<span style="color: #ff0000;">'preg_quote'</span>,
			<span style="color: #ff0000;">'preg_match_all'</span>,<span style="color: #ff0000;">'preg_match'</span>,<span style="color: #ff0000;">'preg_grep'</span>,<span style="color: #ff0000;">'pow'</span>,<span style="color: #ff0000;">'posix_uname'</span>,<span style="color: #ff0000;">'posix_ttyname'</span>,
			<span style="color: #ff0000;">'posix_times'</span>,<span style="color: #ff0000;">'posix_strerror'</span>,<span style="color: #ff0000;">'posix_setuid'</span>,<span style="color: #ff0000;">'posix_setsid'</span>,<span style="color: #ff0000;">'posix_setpgid'</span>,<span style="color: #ff0000;">'posix_setgid'</span>,
			<span style="color: #ff0000;">'posix_seteuid'</span>,<span style="color: #ff0000;">'posix_setegid'</span>,<span style="color: #ff0000;">'posix_mkfifo'</span>,<span style="color: #ff0000;">'posix_kill'</span>,<span style="color: #ff0000;">'posix_isatty'</span>,<span style="color: #ff0000;">'posix_getuid'</span>,
			<span style="color: #ff0000;">'posix_getsid'</span>,<span style="color: #ff0000;">'posix_getrlimit'</span>,<span style="color: #ff0000;">'posix_getpwuid'</span>,<span style="color: #ff0000;">'posix_getpwnam'</span>,<span style="color: #ff0000;">'posix_getppid'</span>,<span style="color: #ff0000;">'posix_getpid'</span>,
			<span style="color: #ff0000;">'posix_getpgrp'</span>,<span style="color: #ff0000;">'posix_getpgid'</span>,<span style="color: #ff0000;">'posix_getlogin'</span>,<span style="color: #ff0000;">'posix_getgroups'</span>,<span style="color: #ff0000;">'posix_getgrnam'</span>,<span style="color: #ff0000;">'posix_getgrgid'</span>,
			<span style="color: #ff0000;">'posix_getgid'</span>,<span style="color: #ff0000;">'posix_geteuid'</span>,<span style="color: #ff0000;">'posix_getegid'</span>,<span style="color: #ff0000;">'posix_getcwd'</span>,<span style="color: #ff0000;">'posix_get_last_error'</span>,<span style="color: #ff0000;">'posix_errno'</span>,
			<span style="color: #ff0000;">'posix_ctermid'</span>,<span style="color: #ff0000;">'pos'</span>,<span style="color: #ff0000;">'popen'</span>,<span style="color: #ff0000;">'pi'</span>,<span style="color: #ff0000;">'phpversion'</span>,<span style="color: #ff0000;">'phpinfo'</span>,
			<span style="color: #ff0000;">'phpcredits'</span>,<span style="color: #ff0000;">'php_uname'</span>,<span style="color: #ff0000;">'php_sapi_name'</span>,<span style="color: #ff0000;">'php_logo_guid'</span>,<span style="color: #ff0000;">'php_ini_scanned_files'</span>,<span style="color: #ff0000;">'pg_update'</span>,
			<span style="color: #ff0000;">'pg_untrace'</span>,<span style="color: #ff0000;">'pg_unescape_bytea'</span>,<span style="color: #ff0000;">'pg_tty'</span>,<span style="color: #ff0000;">'pg_trace'</span>,<span style="color: #ff0000;">'pg_setclientencoding'</span>,<span style="color: #ff0000;">'pg_set_client_encoding'</span>,
			<span style="color: #ff0000;">'pg_send_query'</span>,<span style="color: #ff0000;">'pg_select'</span>,<span style="color: #ff0000;">'pg_result_status'</span>,<span style="color: #ff0000;">'pg_result_seek'</span>,<span style="color: #ff0000;">'pg_result_error'</span>,<span style="color: #ff0000;">'pg_result'</span>,
			<span style="color: #ff0000;">'pg_query'</span>,<span style="color: #ff0000;">'pg_put_line'</span>,<span style="color: #ff0000;">'pg_port'</span>,<span style="color: #ff0000;">'pg_ping'</span>,<span style="color: #ff0000;">'pg_pconnect'</span>,<span style="color: #ff0000;">'pg_options'</span>,
			<span style="color: #ff0000;">'pg_numrows'</span>,<span style="color: #ff0000;">'pg_numfields'</span>,<span style="color: #ff0000;">'pg_num_rows'</span>,<span style="color: #ff0000;">'pg_num_fields'</span>,<span style="color: #ff0000;">'pg_meta_data'</span>,<span style="color: #ff0000;">'pg_lowrite'</span>,
			<span style="color: #ff0000;">'pg_lounlink'</span>,<span style="color: #ff0000;">'pg_loreadall'</span>,<span style="color: #ff0000;">'pg_loread'</span>,<span style="color: #ff0000;">'pg_loopen'</span>,<span style="color: #ff0000;">'pg_loimport'</span>,<span style="color: #ff0000;">'pg_loexport'</span>,
			<span style="color: #ff0000;">'pg_locreate'</span>,<span style="color: #ff0000;">'pg_loclose'</span>,<span style="color: #ff0000;">'pg_lo_write'</span>,<span style="color: #ff0000;">'pg_lo_unlink'</span>,<span style="color: #ff0000;">'pg_lo_tell'</span>,<span style="color: #ff0000;">'pg_lo_seek'</span>,
			<span style="color: #ff0000;">'pg_lo_read_all'</span>,<span style="color: #ff0000;">'pg_lo_read'</span>,<span style="color: #ff0000;">'pg_lo_open'</span>,<span style="color: #ff0000;">'pg_lo_import'</span>,<span style="color: #ff0000;">'pg_lo_export'</span>,<span style="color: #ff0000;">'pg_lo_create'</span>,
			<span style="color: #ff0000;">'pg_lo_close'</span>,<span style="color: #ff0000;">'pg_last_oid'</span>,<span style="color: #ff0000;">'pg_last_notice'</span>,<span style="color: #ff0000;">'pg_last_error'</span>,<span style="color: #ff0000;">'pg_insert'</span>,<span style="color: #ff0000;">'pg_host'</span>,
			<span style="color: #ff0000;">'pg_getlastoid'</span>,<span style="color: #ff0000;">'pg_get_result'</span>,<span style="color: #ff0000;">'pg_get_pid'</span>,<span style="color: #ff0000;">'pg_get_notify'</span>,<span style="color: #ff0000;">'pg_freeresult'</span>,<span style="color: #ff0000;">'pg_free_result'</span>,
			<span style="color: #ff0000;">'pg_fieldtype'</span>,<span style="color: #ff0000;">'pg_fieldsize'</span>,<span style="color: #ff0000;">'pg_fieldprtlen'</span>,<span style="color: #ff0000;">'pg_fieldnum'</span>,<span style="color: #ff0000;">'pg_fieldname'</span>,<span style="color: #ff0000;">'pg_fieldisnull'</span>,
			<span style="color: #ff0000;">'pg_field_type'</span>,<span style="color: #ff0000;">'pg_field_size'</span>,<span style="color: #ff0000;">'pg_field_prtlen'</span>,<span style="color: #ff0000;">'pg_field_num'</span>,<span style="color: #ff0000;">'pg_field_name'</span>,<span style="color: #ff0000;">'pg_field_is_null'</span>,
			<span style="color: #ff0000;">'pg_fetch_row'</span>,<span style="color: #ff0000;">'pg_fetch_result'</span>,<span style="color: #ff0000;">'pg_fetch_object'</span>,<span style="color: #ff0000;">'pg_fetch_assoc'</span>,<span style="color: #ff0000;">'pg_fetch_array'</span>,<span style="color: #ff0000;">'pg_fetch_all'</span>,
			<span style="color: #ff0000;">'pg_exec'</span>,<span style="color: #ff0000;">'pg_escape_string'</span>,<span style="color: #ff0000;">'pg_escape_bytea'</span>,<span style="color: #ff0000;">'pg_errormessage'</span>,<span style="color: #ff0000;">'pg_end_copy'</span>,<span style="color: #ff0000;">'pg_delete'</span>,
			<span style="color: #ff0000;">'pg_dbname'</span>,<span style="color: #ff0000;">'pg_copy_to'</span>,<span style="color: #ff0000;">'pg_copy_from'</span>,<span style="color: #ff0000;">'pg_convert'</span>,<span style="color: #ff0000;">'pg_connection_status'</span>,<span style="color: #ff0000;">'pg_connection_reset'</span>,
			<span style="color: #ff0000;">'pg_connection_busy'</span>,<span style="color: #ff0000;">'pg_connect'</span>,<span style="color: #ff0000;">'pg_cmdtuples'</span>,<span style="color: #ff0000;">'pg_close'</span>,<span style="color: #ff0000;">'pg_clientencoding'</span>,<span style="color: #ff0000;">'pg_client_encoding'</span>,
			<span style="color: #ff0000;">'pg_cancel_query'</span>,<span style="color: #ff0000;">'pg_affected_rows'</span>,<span style="color: #ff0000;">'pfsockopen'</span>,<span style="color: #ff0000;">'pclose'</span>,<span style="color: #ff0000;">'pathinfo'</span>,<span style="color: #ff0000;">'passthru'</span>,
			<span style="color: #ff0000;">'parse_url'</span>,<span style="color: #ff0000;">'parse_str'</span>,<span style="color: #ff0000;">'parse_ini_file'</span>,<span style="color: #ff0000;">'pack'</span>,<span style="color: #ff0000;">'overload'</span>,<span style="color: #ff0000;">'output_reset_rewrite_vars'</span>,
			<span style="color: #ff0000;">'output_add_rewrite_var'</span>,<span style="color: #ff0000;">'ord'</span>,<span style="color: #ff0000;">'openssl_x509_read'</span>,<span style="color: #ff0000;">'openssl_x509_parse'</span>,<span style="color: #ff0000;">'openssl_x509_free'</span>,<span style="color: #ff0000;">'openssl_x509_export_to_file'</span>,
			<span style="color: #ff0000;">'openssl_x509_export'</span>,<span style="color: #ff0000;">'openssl_x509_checkpurpose'</span>,<span style="color: #ff0000;">'openssl_x509_check_private_key'</span>,<span style="color: #ff0000;">'openssl_verify'</span>,<span style="color: #ff0000;">'openssl_sign'</span>,<span style="color: #ff0000;">'openssl_seal'</span>,
			<span style="color: #ff0000;">'openssl_public_encrypt'</span>,<span style="color: #ff0000;">'openssl_public_decrypt'</span>,<span style="color: #ff0000;">'openssl_private_encrypt'</span>,<span style="color: #ff0000;">'openssl_private_decrypt'</span>,<span style="color: #ff0000;">'openssl_pkey_new'</span>,<span style="color: #ff0000;">'openssl_pkey_get_public'</span>,
			<span style="color: #ff0000;">'openssl_pkey_get_private'</span>,<span style="color: #ff0000;">'openssl_pkey_free'</span>,<span style="color: #ff0000;">'openssl_pkey_export_to_file'</span>,<span style="color: #ff0000;">'openssl_pkey_export'</span>,<span style="color: #ff0000;">'openssl_pkcs7_verify'</span>,<span style="color: #ff0000;">'openssl_pkcs7_sign'</span>,
			<span style="color: #ff0000;">'openssl_pkcs7_encrypt'</span>,<span style="color: #ff0000;">'openssl_pkcs7_decrypt'</span>,<span style="color: #ff0000;">'openssl_open'</span>,<span style="color: #ff0000;">'openssl_get_publickey'</span>,<span style="color: #ff0000;">'openssl_get_privatekey'</span>,<span style="color: #ff0000;">'openssl_free_key'</span>,
			<span style="color: #ff0000;">'openssl_error_string'</span>,<span style="color: #ff0000;">'openssl_csr_sign'</span>,<span style="color: #ff0000;">'openssl_csr_new'</span>,<span style="color: #ff0000;">'openssl_csr_export_to_file'</span>,<span style="color: #ff0000;">'openssl_csr_export'</span>,<span style="color: #ff0000;">'openlog'</span>,
			<span style="color: #ff0000;">'opendir'</span>,<span style="color: #ff0000;">'octdec'</span>,<span style="color: #ff0000;">'ob_start'</span>,<span style="color: #ff0000;">'ob_list_handlers'</span>,<span style="color: #ff0000;">'ob_implicit_flush'</span>,<span style="color: #ff0000;">'ob_iconv_handler'</span>,
			<span style="color: #ff0000;">'ob_gzhandler'</span>,<span style="color: #ff0000;">'ob_get_status'</span>,<span style="color: #ff0000;">'ob_get_level'</span>,<span style="color: #ff0000;">'ob_get_length'</span>,<span style="color: #ff0000;">'ob_get_flush'</span>,<span style="color: #ff0000;">'ob_get_contents'</span>,
			<span style="color: #ff0000;">'ob_get_clean'</span>,<span style="color: #ff0000;">'ob_flush'</span>,<span style="color: #ff0000;">'ob_end_flush'</span>,<span style="color: #ff0000;">'ob_end_clean'</span>,<span style="color: #ff0000;">'ob_clean'</span>,<span style="color: #ff0000;">'number_format'</span>,
			<span style="color: #ff0000;">'nl_langinfo'</span>,<span style="color: #ff0000;">'nl2br'</span>,<span style="color: #ff0000;">'ngettext'</span>,<span style="color: #ff0000;">'next'</span>,<span style="color: #ff0000;">'natsort'</span>,<span style="color: #ff0000;">'natcasesort'</span>,
			<span style="color: #ff0000;">'mysql_unbuffered_query'</span>,<span style="color: #ff0000;">'mysql_thread_id'</span>,<span style="color: #ff0000;">'mysql_tablename'</span>,<span style="color: #ff0000;">'mysql_table_name'</span>,<span style="color: #ff0000;">'mysql_stat'</span>,<span style="color: #ff0000;">'mysql_selectdb'</span>,
			<span style="color: #ff0000;">'mysql_select_db'</span>,<span style="color: #ff0000;">'mysql_result'</span>,<span style="color: #ff0000;">'mysql_real_escape_string'</span>,<span style="color: #ff0000;">'mysql_query'</span>,<span style="color: #ff0000;">'mysql_ping'</span>,<span style="color: #ff0000;">'mysql_pconnect'</span>,
			<span style="color: #ff0000;">'mysql_numrows'</span>,<span style="color: #ff0000;">'mysql_numfields'</span>,<span style="color: #ff0000;">'mysql_num_rows'</span>,<span style="color: #ff0000;">'mysql_num_fields'</span>,<span style="color: #ff0000;">'mysql_listtables'</span>,<span style="color: #ff0000;">'mysql_listfields'</span>,
			<span style="color: #ff0000;">'mysql_listdbs'</span>,<span style="color: #ff0000;">'mysql_list_tables'</span>,<span style="color: #ff0000;">'mysql_list_processes'</span>,<span style="color: #ff0000;">'mysql_list_fields'</span>,<span style="color: #ff0000;">'mysql_list_dbs'</span>,<span style="color: #ff0000;">'mysql_insert_id'</span>,
			<span style="color: #ff0000;">'mysql_info'</span>,<span style="color: #ff0000;">'mysql_get_server_info'</span>,<span style="color: #ff0000;">'mysql_get_proto_info'</span>,<span style="color: #ff0000;">'mysql_get_host_info'</span>,<span style="color: #ff0000;">'mysql_get_client_info'</span>,<span style="color: #ff0000;">'mysql_freeresult'</span>,
			<span style="color: #ff0000;">'mysql_free_result'</span>,<span style="color: #ff0000;">'mysql_fieldtype'</span>,<span style="color: #ff0000;">'mysql_fieldtable'</span>,<span style="color: #ff0000;">'mysql_fieldname'</span>,<span style="color: #ff0000;">'mysql_fieldlen'</span>,<span style="color: #ff0000;">'mysql_fieldflags'</span>,
			<span style="color: #ff0000;">'mysql_field_type'</span>,<span style="color: #ff0000;">'mysql_field_table'</span>,<span style="color: #ff0000;">'mysql_field_seek'</span>,<span style="color: #ff0000;">'mysql_field_name'</span>,<span style="color: #ff0000;">'mysql_field_len'</span>,<span style="color: #ff0000;">'mysql_field_flags'</span>,
			<span style="color: #ff0000;">'mysql_fetch_row'</span>,<span style="color: #ff0000;">'mysql_fetch_object'</span>,<span style="color: #ff0000;">'mysql_fetch_lengths'</span>,<span style="color: #ff0000;">'mysql_fetch_field'</span>,<span style="color: #ff0000;">'mysql_fetch_assoc'</span>,<span style="color: #ff0000;">'mysql_fetch_array'</span>,
			<span style="color: #ff0000;">'mysql_escape_string'</span>,<span style="color: #ff0000;">'mysql_error'</span>,<span style="color: #ff0000;">'mysql_errno'</span>,<span style="color: #ff0000;">'mysql_dropdb'</span>,<span style="color: #ff0000;">'mysql_drop_db'</span>,<span style="color: #ff0000;">'mysql_dbname'</span>,
			<span style="color: #ff0000;">'mysql_db_query'</span>,<span style="color: #ff0000;">'mysql_db_name'</span>,<span style="color: #ff0000;">'mysql_data_seek'</span>,<span style="color: #ff0000;">'mysql_createdb'</span>,<span style="color: #ff0000;">'mysql_create_db'</span>,<span style="color: #ff0000;">'mysql_connect'</span>,
			<span style="color: #ff0000;">'mysql_close'</span>,<span style="color: #ff0000;">'mysql_client_encoding'</span>,<span style="color: #ff0000;">'mysql_affected_rows'</span>,<span style="color: #ff0000;">'mysql'</span>,<span style="color: #ff0000;">'mt_srand'</span>,<span style="color: #ff0000;">'mt_rand'</span>,
			<span style="color: #ff0000;">'mt_getrandmax'</span>,<span style="color: #ff0000;">'move_uploaded_file'</span>,<span style="color: #ff0000;">'money_format'</span>,<span style="color: #ff0000;">'mktime'</span>,<span style="color: #ff0000;">'mkdir'</span>,<span style="color: #ff0000;">'min'</span>,
			<span style="color: #ff0000;">'microtime'</span>,<span style="color: #ff0000;">'method_exists'</span>,<span style="color: #ff0000;">'metaphone'</span>,<span style="color: #ff0000;">'memory_get_usage'</span>,<span style="color: #ff0000;">'md5_file'</span>,<span style="color: #ff0000;">'md5'</span>,
			<span style="color: #ff0000;">'mbsubstr'</span>,<span style="color: #ff0000;">'mbstrrpos'</span>,<span style="color: #ff0000;">'mbstrpos'</span>,<span style="color: #ff0000;">'mbstrlen'</span>,<span style="color: #ff0000;">'mbstrcut'</span>,<span style="color: #ff0000;">'mbsplit'</span>,
			<span style="color: #ff0000;">'mbregex_encoding'</span>,<span style="color: #ff0000;">'mberegi_replace'</span>,<span style="color: #ff0000;">'mberegi'</span>,<span style="color: #ff0000;">'mbereg_search_setpos'</span>,<span style="color: #ff0000;">'mbereg_search_regs'</span>,<span style="color: #ff0000;">'mbereg_search_pos'</span>,
			<span style="color: #ff0000;">'mbereg_search_init'</span>,<span style="color: #ff0000;">'mbereg_search_getregs'</span>,<span style="color: #ff0000;">'mbereg_search_getpos'</span>,<span style="color: #ff0000;">'mbereg_search'</span>,<span style="color: #ff0000;">'mbereg_replace'</span>,<span style="color: #ff0000;">'mbereg_match'</span>,
			<span style="color: #ff0000;">'mbereg'</span>,<span style="color: #ff0000;">'mb_substr_count'</span>,<span style="color: #ff0000;">'mb_substr'</span>,<span style="color: #ff0000;">'mb_substitute_character'</span>,<span style="color: #ff0000;">'mb_strwidth'</span>,<span style="color: #ff0000;">'mb_strtoupper'</span>,
			<span style="color: #ff0000;">'mb_strtolower'</span>,<span style="color: #ff0000;">'mb_strrpos'</span>,<span style="color: #ff0000;">'mb_strpos'</span>,<span style="color: #ff0000;">'mb_strlen'</span>,<span style="color: #ff0000;">'mb_strimwidth'</span>,<span style="color: #ff0000;">'mb_strcut'</span>,
			<span style="color: #ff0000;">'mb_split'</span>,<span style="color: #ff0000;">'mb_send_mail'</span>,<span style="color: #ff0000;">'mb_regex_set_options'</span>,<span style="color: #ff0000;">'mb_regex_encoding'</span>,<span style="color: #ff0000;">'mb_preferred_mime_name'</span>,<span style="color: #ff0000;">'mb_parse_str'</span>,
			<span style="color: #ff0000;">'mb_output_handler'</span>,<span style="color: #ff0000;">'mb_language'</span>,<span style="color: #ff0000;">'mb_internal_encoding'</span>,<span style="color: #ff0000;">'mb_http_output'</span>,<span style="color: #ff0000;">'mb_http_input'</span>,<span style="color: #ff0000;">'mb_get_info'</span>,
			<span style="color: #ff0000;">'mb_eregi_replace'</span>,<span style="color: #ff0000;">'mb_eregi'</span>,<span style="color: #ff0000;">'mb_ereg_search_setpos'</span>,<span style="color: #ff0000;">'mb_ereg_search_regs'</span>,<span style="color: #ff0000;">'mb_ereg_search_pos'</span>,<span style="color: #ff0000;">'mb_ereg_search_init'</span>,
			<span style="color: #ff0000;">'mb_ereg_search_getregs'</span>,<span style="color: #ff0000;">'mb_ereg_search_getpos'</span>,<span style="color: #ff0000;">'mb_ereg_search'</span>,<span style="color: #ff0000;">'mb_ereg_replace'</span>,<span style="color: #ff0000;">'mb_ereg_match'</span>,<span style="color: #ff0000;">'mb_ereg'</span>,
			<span style="color: #ff0000;">'mb_encode_numericentity'</span>,<span style="color: #ff0000;">'mb_encode_mimeheader'</span>,<span style="color: #ff0000;">'mb_detect_order'</span>,<span style="color: #ff0000;">'mb_detect_encoding'</span>,<span style="color: #ff0000;">'mb_decode_numericentity'</span>,<span style="color: #ff0000;">'mb_decode_mimeheader'</span>,
			<span style="color: #ff0000;">'mb_convert_variables'</span>,<span style="color: #ff0000;">'mb_convert_kana'</span>,<span style="color: #ff0000;">'mb_convert_encoding'</span>,<span style="color: #ff0000;">'mb_convert_case'</span>,<span style="color: #ff0000;">'max'</span>,<span style="color: #ff0000;">'mail'</span>,
			<span style="color: #ff0000;">'magic_quotes_runtime'</span>,<span style="color: #ff0000;">'ltrim'</span>,<span style="color: #ff0000;">'lstat'</span>,<span style="color: #ff0000;">'long2ip'</span>,<span style="color: #ff0000;">'log1p'</span>,<span style="color: #ff0000;">'log10'</span>,
			<span style="color: #ff0000;">'log'</span>,<span style="color: #ff0000;">'localtime'</span>,<span style="color: #ff0000;">'localeconv'</span>,<span style="color: #ff0000;">'linkinfo'</span>,<span style="color: #ff0000;">'link'</span>,<span style="color: #ff0000;">'levenshtein'</span>,
			<span style="color: #ff0000;">'lcg_value'</span>,<span style="color: #ff0000;">'ksort'</span>,<span style="color: #ff0000;">'krsort'</span>,<span style="color: #ff0000;">'key_exists'</span>,<span style="color: #ff0000;">'key'</span>,<span style="color: #ff0000;">'juliantojd'</span>,
			<span style="color: #ff0000;">'join'</span>,<span style="color: #ff0000;">'jewishtojd'</span>,<span style="color: #ff0000;">'jdtounix'</span>,<span style="color: #ff0000;">'jdtojulian'</span>,<span style="color: #ff0000;">'jdtojewish'</span>,<span style="color: #ff0000;">'jdtogregorian'</span>,
			<span style="color: #ff0000;">'jdtofrench'</span>,<span style="color: #ff0000;">'jdmonthname'</span>,<span style="color: #ff0000;">'jddayofweek'</span>,<span style="color: #ff0000;">'is_writeable'</span>,<span style="color: #ff0000;">'is_writable'</span>,<span style="color: #ff0000;">'is_uploaded_file'</span>,
			<span style="color: #ff0000;">'is_subclass_of'</span>,<span style="color: #ff0000;">'is_string'</span>,<span style="color: #ff0000;">'is_scalar'</span>,<span style="color: #ff0000;">'is_resource'</span>,<span style="color: #ff0000;">'is_real'</span>,<span style="color: #ff0000;">'is_readable'</span>,
			<span style="color: #ff0000;">'is_object'</span>,<span style="color: #ff0000;">'is_numeric'</span>,<span style="color: #ff0000;">'is_null'</span>,<span style="color: #ff0000;">'is_nan'</span>,<span style="color: #ff0000;">'is_long'</span>,<span style="color: #ff0000;">'is_link'</span>,
			<span style="color: #ff0000;">'is_integer'</span>,<span style="color: #ff0000;">'is_int'</span>,<span style="color: #ff0000;">'is_infinite'</span>,<span style="color: #ff0000;">'is_float'</span>,<span style="color: #ff0000;">'is_finite'</span>,<span style="color: #ff0000;">'is_file'</span>,
			<span style="color: #ff0000;">'is_executable'</span>,<span style="color: #ff0000;">'is_double'</span>,<span style="color: #ff0000;">'is_dir'</span>,<span style="color: #ff0000;">'is_callable'</span>,<span style="color: #ff0000;">'is_bool'</span>,<span style="color: #ff0000;">'is_array'</span>,
			<span style="color: #ff0000;">'is_a'</span>,<span style="color: #ff0000;">'iptcparse'</span>,<span style="color: #ff0000;">'iptcembed'</span>,<span style="color: #ff0000;">'ip2long'</span>,<span style="color: #ff0000;">'intval'</span>,<span style="color: #ff0000;">'ini_set'</span>,
			<span style="color: #ff0000;">'ini_restore'</span>,<span style="color: #ff0000;">'ini_get_all'</span>,<span style="color: #ff0000;">'ini_get'</span>,<span style="color: #ff0000;">'ini_alter'</span>,<span style="color: #ff0000;">'in_array'</span>,<span style="color: #ff0000;">'import_request_variables'</span>,
			<span style="color: #ff0000;">'implode'</span>,<span style="color: #ff0000;">'image_type_to_mime_type'</span>,<span style="color: #ff0000;">'ignore_user_abort'</span>,<span style="color: #ff0000;">'iconv_set_encoding'</span>,<span style="color: #ff0000;">'iconv_get_encoding'</span>,<span style="color: #ff0000;">'iconv'</span>,
			<span style="color: #ff0000;">'i18n_mime_header_encode'</span>,<span style="color: #ff0000;">'i18n_mime_header_decode'</span>,<span style="color: #ff0000;">'i18n_ja_jp_hantozen'</span>,<span style="color: #ff0000;">'i18n_internal_encoding'</span>,<span style="color: #ff0000;">'i18n_http_output'</span>,<span style="color: #ff0000;">'i18n_http_input'</span>,
			<span style="color: #ff0000;">'i18n_discover_encoding'</span>,<span style="color: #ff0000;">'i18n_convert'</span>,<span style="color: #ff0000;">'hypot'</span>,<span style="color: #ff0000;">'htmlspecialchars'</span>,<span style="color: #ff0000;">'htmlentities'</span>,<span style="color: #ff0000;">'html_entity_decode'</span>,
			<span style="color: #ff0000;">'highlight_string'</span>,<span style="color: #ff0000;">'highlight_file'</span>,<span style="color: #ff0000;">'hexdec'</span>,<span style="color: #ff0000;">'hebrevc'</span>,<span style="color: #ff0000;">'hebrev'</span>,<span style="color: #ff0000;">'headers_sent'</span>,
			<span style="color: #ff0000;">'header'</span>,<span style="color: #ff0000;">'gzwrite'</span>,<span style="color: #ff0000;">'gzuncompress'</span>,<span style="color: #ff0000;">'gztell'</span>,<span style="color: #ff0000;">'gzseek'</span>,<span style="color: #ff0000;">'gzrewind'</span>,
			<span style="color: #ff0000;">'gzread'</span>,<span style="color: #ff0000;">'gzputs'</span>,<span style="color: #ff0000;">'gzpassthru'</span>,<span style="color: #ff0000;">'gzopen'</span>,<span style="color: #ff0000;">'gzinflate'</span>,<span style="color: #ff0000;">'gzgetss'</span>,
			<span style="color: #ff0000;">'gzgets'</span>,<span style="color: #ff0000;">'gzgetc'</span>,<span style="color: #ff0000;">'gzfile'</span>,<span style="color: #ff0000;">'gzeof'</span>,<span style="color: #ff0000;">'gzencode'</span>,<span style="color: #ff0000;">'gzdeflate'</span>,
			<span style="color: #ff0000;">'gzcompress'</span>,<span style="color: #ff0000;">'gzclose'</span>,<span style="color: #ff0000;">'gregoriantojd'</span>,<span style="color: #ff0000;">'gmstrftime'</span>,<span style="color: #ff0000;">'gmmktime'</span>,<span style="color: #ff0000;">'gmdate'</span>,
			<span style="color: #ff0000;">'glob'</span>,<span style="color: #ff0000;">'gettype'</span>,<span style="color: #ff0000;">'gettimeofday'</span>,<span style="color: #ff0000;">'gettext'</span>,<span style="color: #ff0000;">'getservbyport'</span>,<span style="color: #ff0000;">'getservbyname'</span>,
			<span style="color: #ff0000;">'getrusage'</span>,<span style="color: #ff0000;">'getrandmax'</span>,<span style="color: #ff0000;">'getprotobynumber'</span>,<span style="color: #ff0000;">'getprotobyname'</span>,<span style="color: #ff0000;">'getopt'</span>,<span style="color: #ff0000;">'getmyuid'</span>,
			<span style="color: #ff0000;">'getmypid'</span>,<span style="color: #ff0000;">'getmyinode'</span>,<span style="color: #ff0000;">'getmygid'</span>,<span style="color: #ff0000;">'getmxrr'</span>,<span style="color: #ff0000;">'getlastmod'</span>,<span style="color: #ff0000;">'getimagesize'</span>,
			<span style="color: #ff0000;">'gethostbynamel'</span>,<span style="color: #ff0000;">'gethostbyname'</span>,<span style="color: #ff0000;">'gethostbyaddr'</span>,<span style="color: #ff0000;">'getenv'</span>,<span style="color: #ff0000;">'getdate'</span>,<span style="color: #ff0000;">'getcwd'</span>,
			<span style="color: #ff0000;">'getallheaders'</span>,<span style="color: #ff0000;">'get_resource_type'</span>,<span style="color: #ff0000;">'get_required_files'</span>,<span style="color: #ff0000;">'get_parent_class'</span>,<span style="color: #ff0000;">'get_object_vars'</span>,<span style="color: #ff0000;">'get_meta_tags'</span>,
			<span style="color: #ff0000;">'get_magic_quotes_runtime'</span>,<span style="color: #ff0000;">'get_magic_quotes_gpc'</span>,<span style="color: #ff0000;">'get_loaded_extensions'</span>,<span style="color: #ff0000;">'get_included_files'</span>,<span style="color: #ff0000;">'get_include_path'</span>,<span style="color: #ff0000;">'get_html_translation_table'</span>,
			<span style="color: #ff0000;">'get_extension_funcs'</span>,<span style="color: #ff0000;">'get_defined_vars'</span>,<span style="color: #ff0000;">'get_defined_functions'</span>,<span style="color: #ff0000;">'get_defined_constants'</span>,<span style="color: #ff0000;">'get_declared_classes'</span>,<span style="color: #ff0000;">'get_current_user'</span>,
			<span style="color: #ff0000;">'get_class_vars'</span>,<span style="color: #ff0000;">'get_class_methods'</span>,<span style="color: #ff0000;">'get_class'</span>,<span style="color: #ff0000;">'get_cfg_var'</span>,<span style="color: #ff0000;">'get_browser'</span>,<span style="color: #ff0000;">'fwrite'</span>,
			<span style="color: #ff0000;">'function_exists'</span>,<span style="color: #ff0000;">'func_num_args'</span>,<span style="color: #ff0000;">'func_get_args'</span>,<span style="color: #ff0000;">'func_get_arg'</span>,<span style="color: #ff0000;">'ftruncate'</span>,<span style="color: #ff0000;">'ftp_systype'</span>,
			<span style="color: #ff0000;">'ftp_ssl_connect'</span>,<span style="color: #ff0000;">'ftp_size'</span>,<span style="color: #ff0000;">'ftp_site'</span>,<span style="color: #ff0000;">'ftp_set_option'</span>,<span style="color: #ff0000;">'ftp_rmdir'</span>,<span style="color: #ff0000;">'ftp_rename'</span>,
			<span style="color: #ff0000;">'ftp_rawlist'</span>,<span style="color: #ff0000;">'ftp_quit'</span>,<span style="color: #ff0000;">'ftp_pwd'</span>,<span style="color: #ff0000;">'ftp_put'</span>,<span style="color: #ff0000;">'ftp_pasv'</span>,<span style="color: #ff0000;">'ftp_nlist'</span>,
			<span style="color: #ff0000;">'ftp_nb_put'</span>,<span style="color: #ff0000;">'ftp_nb_get'</span>,<span style="color: #ff0000;">'ftp_nb_fput'</span>,<span style="color: #ff0000;">'ftp_nb_fget'</span>,<span style="color: #ff0000;">'ftp_nb_continue'</span>,<span style="color: #ff0000;">'ftp_mkdir'</span>,
			<span style="color: #ff0000;">'ftp_mdtm'</span>,<span style="color: #ff0000;">'ftp_login'</span>,<span style="color: #ff0000;">'ftp_get_option'</span>,<span style="color: #ff0000;">'ftp_get'</span>,<span style="color: #ff0000;">'ftp_fput'</span>,<span style="color: #ff0000;">'ftp_fget'</span>,
			<span style="color: #ff0000;">'ftp_exec'</span>,<span style="color: #ff0000;">'ftp_delete'</span>,<span style="color: #ff0000;">'ftp_connect'</span>,<span style="color: #ff0000;">'ftp_close'</span>,<span style="color: #ff0000;">'ftp_chdir'</span>,<span style="color: #ff0000;">'ftp_cdup'</span>,
			<span style="color: #ff0000;">'ftok'</span>,<span style="color: #ff0000;">'ftell'</span>,<span style="color: #ff0000;">'fstat'</span>,<span style="color: #ff0000;">'fsockopen'</span>,<span style="color: #ff0000;">'fseek'</span>,<span style="color: #ff0000;">'fscanf'</span>,
			<span style="color: #ff0000;">'frenchtojd'</span>,<span style="color: #ff0000;">'fread'</span>,<span style="color: #ff0000;">'fputs'</span>,<span style="color: #ff0000;">'fpassthru'</span>,<span style="color: #ff0000;">'fopen'</span>,<span style="color: #ff0000;">'fnmatch'</span>,
			<span style="color: #ff0000;">'fmod'</span>,<span style="color: #ff0000;">'flush'</span>,<span style="color: #ff0000;">'floor'</span>,<span style="color: #ff0000;">'flock'</span>,<span style="color: #ff0000;">'floatval'</span>,<span style="color: #ff0000;">'filetype'</span>,
			<span style="color: #ff0000;">'filesize'</span>,<span style="color: #ff0000;">'filepro_rowcount'</span>,<span style="color: #ff0000;">'filepro_retrieve'</span>,<span style="color: #ff0000;">'filepro_fieldwidth'</span>,<span style="color: #ff0000;">'filepro_fieldtype'</span>,<span style="color: #ff0000;">'filepro_fieldname'</span>,
			<span style="color: #ff0000;">'filepro_fieldcount'</span>,<span style="color: #ff0000;">'filepro'</span>,<span style="color: #ff0000;">'fileperms'</span>,<span style="color: #ff0000;">'fileowner'</span>,<span style="color: #ff0000;">'filemtime'</span>,<span style="color: #ff0000;">'fileinode'</span>,
			<span style="color: #ff0000;">'filegroup'</span>,<span style="color: #ff0000;">'filectime'</span>,<span style="color: #ff0000;">'fileatime'</span>,<span style="color: #ff0000;">'file_get_contents'</span>,<span style="color: #ff0000;">'file_exists'</span>,<span style="color: #ff0000;">'file'</span>,
			<span style="color: #ff0000;">'fgetss'</span>,<span style="color: #ff0000;">'fgets'</span>,<span style="color: #ff0000;">'fgetcsv'</span>,<span style="color: #ff0000;">'fgetc'</span>,<span style="color: #ff0000;">'fflush'</span>,<span style="color: #ff0000;">'feof'</span>,
			<span style="color: #ff0000;">'fclose'</span>,<span style="color: #ff0000;">'ezmlm_hash'</span>,<span style="color: #ff0000;">'extract'</span>,<span style="color: #ff0000;">'extension_loaded'</span>,<span style="color: #ff0000;">'expm1'</span>,<span style="color: #ff0000;">'explode'</span>,
			<span style="color: #ff0000;">'exp'</span>,<span style="color: #ff0000;">'exif_thumbnail'</span>,<span style="color: #ff0000;">'exif_tagname'</span>,<span style="color: #ff0000;">'exif_read_data'</span>,<span style="color: #ff0000;">'exif_imagetype'</span>,<span style="color: #ff0000;">'exec'</span>,
			<span style="color: #ff0000;">'escapeshellcmd'</span>,<span style="color: #ff0000;">'escapeshellarg'</span>,<span style="color: #ff0000;">'error_reporting'</span>,<span style="color: #ff0000;">'error_log'</span>,<span style="color: #ff0000;">'eregi_replace'</span>,<span style="color: #ff0000;">'eregi'</span>,
			<span style="color: #ff0000;">'ereg_replace'</span>,<span style="color: #ff0000;">'ereg'</span>,<span style="color: #ff0000;">'end'</span>,<span style="color: #ff0000;">'easter_days'</span>,<span style="color: #ff0000;">'easter_date'</span>,<span style="color: #ff0000;">'each'</span>,
			<span style="color: #ff0000;">'doubleval'</span>,<span style="color: #ff0000;">'dngettext'</span>,<span style="color: #ff0000;">'dl'</span>,<span style="color: #ff0000;">'diskfreespace'</span>,<span style="color: #ff0000;">'disk_total_space'</span>,<span style="color: #ff0000;">'disk_free_space'</span>,
			<span style="color: #ff0000;">'dirname'</span>,<span style="color: #ff0000;">'dir'</span>,<span style="color: #ff0000;">'dgettext'</span>,<span style="color: #ff0000;">'deg2rad'</span>,<span style="color: #ff0000;">'defined'</span>,<span style="color: #ff0000;">'define_syslog_variables'</span>,
			<span style="color: #ff0000;">'define'</span>,<span style="color: #ff0000;">'decoct'</span>,<span style="color: #ff0000;">'dechex'</span>,<span style="color: #ff0000;">'decbin'</span>,<span style="color: #ff0000;">'debug_zval_dump'</span>,<span style="color: #ff0000;">'debug_backtrace'</span>,
			<span style="color: #ff0000;">'deaggregate'</span>,<span style="color: #ff0000;">'dcngettext'</span>,<span style="color: #ff0000;">'dcgettext'</span>,<span style="color: #ff0000;">'dba_sync'</span>,<span style="color: #ff0000;">'dba_replace'</span>,<span style="color: #ff0000;">'dba_popen'</span>,
			<span style="color: #ff0000;">'dba_optimize'</span>,<span style="color: #ff0000;">'dba_open'</span>,<span style="color: #ff0000;">'dba_nextkey'</span>,<span style="color: #ff0000;">'dba_list'</span>,<span style="color: #ff0000;">'dba_insert'</span>,<span style="color: #ff0000;">'dba_handlers'</span>,
			<span style="color: #ff0000;">'dba_firstkey'</span>,<span style="color: #ff0000;">'dba_fetch'</span>,<span style="color: #ff0000;">'dba_exists'</span>,<span style="color: #ff0000;">'dba_delete'</span>,<span style="color: #ff0000;">'dba_close'</span>,<span style="color: #ff0000;">'date'</span>,
			<span style="color: #ff0000;">'current'</span>,<span style="color: #ff0000;">'ctype_xdigit'</span>,<span style="color: #ff0000;">'ctype_upper'</span>,<span style="color: #ff0000;">'ctype_space'</span>,<span style="color: #ff0000;">'ctype_punct'</span>,<span style="color: #ff0000;">'ctype_print'</span>,
			<span style="color: #ff0000;">'ctype_lower'</span>,<span style="color: #ff0000;">'ctype_graph'</span>,<span style="color: #ff0000;">'ctype_digit'</span>,<span style="color: #ff0000;">'ctype_cntrl'</span>,<span style="color: #ff0000;">'ctype_alpha'</span>,<span style="color: #ff0000;">'ctype_alnum'</span>,
			<span style="color: #ff0000;">'crypt'</span>,<span style="color: #ff0000;">'create_function'</span>,<span style="color: #ff0000;">'crc32'</span>,<span style="color: #ff0000;">'count_chars'</span>,<span style="color: #ff0000;">'count'</span>,<span style="color: #ff0000;">'cosh'</span>,
			<span style="color: #ff0000;">'cos'</span>,<span style="color: #ff0000;">'copy'</span>,<span style="color: #ff0000;">'convert_cyr_string'</span>,<span style="color: #ff0000;">'constant'</span>,<span style="color: #ff0000;">'connection_status'</span>,<span style="color: #ff0000;">'connection_aborted'</span>,
			<span style="color: #ff0000;">'compact'</span>,<span style="color: #ff0000;">'closelog'</span>,<span style="color: #ff0000;">'closedir'</span>,<span style="color: #ff0000;">'clearstatcache'</span>,<span style="color: #ff0000;">'class_exists'</span>,<span style="color: #ff0000;">'chunk_split'</span>,
			<span style="color: #ff0000;">'chr'</span>,<span style="color: #ff0000;">'chown'</span>,<span style="color: #ff0000;">'chop'</span>,<span style="color: #ff0000;">'chmod'</span>,<span style="color: #ff0000;">'chgrp'</span>,<span style="color: #ff0000;">'checkdnsrr'</span>,
			<span style="color: #ff0000;">'checkdate'</span>,<span style="color: #ff0000;">'chdir'</span>,<span style="color: #ff0000;">'ceil'</span>,<span style="color: #ff0000;">'call_user_method_array'</span>,<span style="color: #ff0000;">'call_user_method'</span>,<span style="color: #ff0000;">'call_user_func_array'</span>,
			<span style="color: #ff0000;">'call_user_func'</span>,<span style="color: #ff0000;">'cal_to_jd'</span>,<span style="color: #ff0000;">'cal_info'</span>,<span style="color: #ff0000;">'cal_from_jd'</span>,<span style="color: #ff0000;">'cal_days_in_month'</span>,<span style="color: #ff0000;">'bzwrite'</span>,
			<span style="color: #ff0000;">'bzread'</span>,<span style="color: #ff0000;">'bzopen'</span>,<span style="color: #ff0000;">'bzflush'</span>,<span style="color: #ff0000;">'bzerrstr'</span>,<span style="color: #ff0000;">'bzerror'</span>,<span style="color: #ff0000;">'bzerrno'</span>,
			<span style="color: #ff0000;">'bzdecompress'</span>,<span style="color: #ff0000;">'bzcompress'</span>,<span style="color: #ff0000;">'bzclose'</span>,<span style="color: #ff0000;">'bindtextdomain'</span>,<span style="color: #ff0000;">'bindec'</span>,<span style="color: #ff0000;">'bind_textdomain_codeset'</span>,
			<span style="color: #ff0000;">'bin2hex'</span>,<span style="color: #ff0000;">'bcsub'</span>,<span style="color: #ff0000;">'bcsqrt'</span>,<span style="color: #ff0000;">'bcscale'</span>,<span style="color: #ff0000;">'bcpow'</span>,<span style="color: #ff0000;">'bcmul'</span>,
			<span style="color: #ff0000;">'bcmod'</span>,<span style="color: #ff0000;">'bcdiv'</span>,<span style="color: #ff0000;">'bccomp'</span>,<span style="color: #ff0000;">'bcadd'</span>,<span style="color: #ff0000;">'basename'</span>,<span style="color: #ff0000;">'base_convert'</span>,
			<span style="color: #ff0000;">'base64_encode'</span>,<span style="color: #ff0000;">'base64_decode'</span>,<span style="color: #ff0000;">'atanh'</span>,<span style="color: #ff0000;">'atan2'</span>,<span style="color: #ff0000;">'atan'</span>,<span style="color: #ff0000;">'assert_options'</span>,
			<span style="color: #ff0000;">'assert'</span>,<span style="color: #ff0000;">'asort'</span>,<span style="color: #ff0000;">'asinh'</span>,<span style="color: #ff0000;">'asin'</span>,<span style="color: #ff0000;">'arsort'</span>,<span style="color: #ff0000;">'array_walk'</span>,
			<span style="color: #ff0000;">'array_values'</span>,<span style="color: #ff0000;">'array_unshift'</span>,<span style="color: #ff0000;">'array_unique'</span>,<span style="color: #ff0000;">'array_sum'</span>,<span style="color: #ff0000;">'array_splice'</span>,<span style="color: #ff0000;">'array_slice'</span>,
			<span style="color: #ff0000;">'array_shift'</span>,<span style="color: #ff0000;">'array_search'</span>,<span style="color: #ff0000;">'array_reverse'</span>,<span style="color: #ff0000;">'array_reduce'</span>,<span style="color: #ff0000;">'array_rand'</span>,<span style="color: #ff0000;">'array_push'</span>,
			<span style="color: #ff0000;">'array_pop'</span>,<span style="color: #ff0000;">'array_pad'</span>,<span style="color: #ff0000;">'array_multisort'</span>,<span style="color: #ff0000;">'array_merge_recursive'</span>,<span style="color: #ff0000;">'array_merge'</span>,<span style="color: #ff0000;">'array_map'</span>,
			<span style="color: #ff0000;">'array_keys'</span>,<span style="color: #ff0000;">'array_key_exists'</span>,<span style="color: #ff0000;">'array_intersect_assoc'</span>,<span style="color: #ff0000;">'array_intersect'</span>,<span style="color: #ff0000;">'array_flip'</span>,<span style="color: #ff0000;">'array_filter'</span>,
			<span style="color: #ff0000;">'array_fill'</span>,<span style="color: #ff0000;">'array_diff_assoc'</span>,<span style="color: #ff0000;">'array_diff'</span>,<span style="color: #ff0000;">'array_count_values'</span>,<span style="color: #ff0000;">'array_chunk'</span>,<span style="color: #ff0000;">'array_change_key_case'</span>,
			<span style="color: #ff0000;">'apache_setenv'</span>,<span style="color: #ff0000;">'apache_response_headers'</span>,<span style="color: #ff0000;">'apache_request_headers'</span>,<span style="color: #ff0000;">'apache_note'</span>,<span style="color: #ff0000;">'apache_lookup_uri'</span>,<span style="color: #ff0000;">'apache_get_version'</span>,
			<span style="color: #ff0000;">'apache_child_terminate'</span>,<span style="color: #ff0000;">'aggregation_info'</span>,<span style="color: #ff0000;">'aggregate_properties_by_regexp'</span>,<span style="color: #ff0000;">'aggregate_properties_by_list'</span>,<span style="color: #ff0000;">'aggregate_properties'</span>,<span style="color: #ff0000;">'aggregate_methods_by_regexp'</span>,
			<span style="color: #ff0000;">'aggregate_methods_by_list'</span>,<span style="color: #ff0000;">'aggregate_methods'</span>,<span style="color: #ff0000;">'aggregate'</span>,<span style="color: #ff0000;">'addslashes'</span>,<span style="color: #ff0000;">'addcslashes'</span>,<span style="color: #ff0000;">'acosh'</span>,
			<span style="color: #ff0000;">'acos'</span>,<span style="color: #ff0000;">'abs'</span>,<span style="color: #ff0000;">'_'</span>,<span style="color: #ff0000;">'echo'</span>, <span style="color: #ff0000;">'print'</span>, <span style="color: #ff0000;">'global'</span>, <span style="color: #ff0000;">'static'</span>, <span style="color: #ff0000;">'exit'</span>, <span style="color: #ff0000;">'array'</span>, <span style="color: #ff0000;">'empty'</span>, <span style="color: #ff0000;">'eval'</span>, <span style="color: #ff0000;">'isset'</span>, <span style="color: #ff0000;">'unset'</span>, <span style="color: #ff0000;">'die'</span>
			<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'SYMBOLS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #ff0000;">'('</span>, <span style="color: #ff0000;">')'</span>, <span style="color: #ff0000;">'['</span>, <span style="color: #ff0000;">']'</span>, <span style="color: #ff0000;">'{'</span>, <span style="color: #ff0000;">'}'</span>, <span style="color: #ff0000;">'!'</span>, <span style="color: #ff0000;">'@'</span>, <span style="color: #ff0000;">'%'</span>, <span style="color: #ff0000;">'&amp;'</span>, <span style="color: #ff0000;">'*'</span>, <span style="color: #ff0000;">'|'</span>, <span style="color: #ff0000;">'/'</span>, <span style="color: #ff0000;">'&lt;'</span>, <span style="color: #ff0000;">'&gt;'</span>
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'CASE_SENSITIVE'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		GESHI_COMMENTS =&gt; <span style="color: #000000; font-weight: bold;">false</span>,
		<span style="color: #cc66cc;">1</span> =&gt; <span style="color: #000000; font-weight: bold;">false</span>,
		<span style="color: #cc66cc;">2</span> =&gt; <span style="color: #000000; font-weight: bold;">false</span>,
		<span style="color: #cc66cc;">3</span> =&gt; <span style="color: #000000; font-weight: bold;">false</span>,
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'STYLES'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #ff0000;">'KEYWORDS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">1</span> =&gt; <span style="color: #ff0000;">'color: #b1b100;'</span>,
			<span style="color: #cc66cc;">2</span> =&gt; <span style="color: #ff0000;">'color: #000000; font-weight: bold;'</span>,
			<span style="color: #cc66cc;">3</span> =&gt; <span style="color: #ff0000;">'color: #000066;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'COMMENTS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">1</span> =&gt; <span style="color: #ff0000;">'color: #808080; font-style: italic;'</span>,
			<span style="color: #cc66cc;">2</span> =&gt; <span style="color: #ff0000;">'color: #808080; font-style: italic;'</span>,
			<span style="color: #ff0000;">'MULTI'</span> =&gt; <span style="color: #ff0000;">'color: #808080; font-style: italic;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'ESCAPE_CHAR'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #000099; font-weight: bold;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'BRACKETS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #66cc66;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'STRINGS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #ff0000;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'NUMBERS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #cc66cc;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'METHODS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #006600;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'SYMBOLS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #66cc66;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'REGEXPS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">'color: #0000ff;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #ff0000;">'SCRIPT'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">''</span>,
			<span style="color: #cc66cc;">1</span> =&gt; <span style="color: #ff0000;">''</span>,
			<span style="color: #cc66cc;">2</span> =&gt; <span style="color: #ff0000;">''</span>,
			<span style="color: #cc66cc;">3</span> =&gt; <span style="color: #ff0000;">''</span>
			<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'URLS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #cc66cc;">1</span> =&gt; <span style="color: #ff0000;">''</span>,
		<span style="color: #cc66cc;">2</span> =&gt; <span style="color: #ff0000;">''</span>,
		<span style="color: #cc66cc;">3</span> =&gt; <span style="color: #ff0000;">'http://www.php.net/{FNAME}'</span>,
		<span style="color: #cc66cc;">4</span> =&gt; <span style="color: #ff0000;">''</span>
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'OOLANG'</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
	<span style="color: #ff0000;">'OBJECT_SPLITTER'</span> =&gt; <span style="color: #ff0000;">'-&amp;gt;'</span>,
	<span style="color: #ff0000;">'REGEXPS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #ff0000;">"[<span style="color: #000099; font-weight: bold;">\\</span>$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"</span>
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'STRICT_MODE_APPLIES'</span> =&gt; GESHI_MAYBE,
	<span style="color: #ff0000;">'SCRIPT_DELIMITERS'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #cc66cc;">0</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'&lt;?php'</span> =&gt; <span style="color: #ff0000;">'?&gt;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #cc66cc;">1</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'&lt;?'</span> =&gt; <span style="color: #ff0000;">'?&gt;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #cc66cc;">2</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'&lt;%'</span> =&gt; <span style="color: #ff0000;">'%&gt;'</span>
			<span style="color: #66cc66;">&#41;</span>,
		<span style="color: #cc66cc;">3</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'&lt;script language=&quot;php&quot;&gt;'</span> =&gt; <span style="color: #ff0000;">'&lt;/script&gt;'</span>
			<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#41;</span>,
	<span style="color: #ff0000;">'HIGHLIGHT_STRICT_BLOCK'</span> =&gt; <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span>
		<span style="color: #cc66cc;">0</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
		<span style="color: #cc66cc;">1</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
		<span style="color: #cc66cc;">2</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
		<span style="color: #cc66cc;">3</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>
		<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>

<p>If you're remotely familiar with PHP (or even if you're not), you can see that all that a language file
consists of is a glorified variable assignment. Easy! All a language file does is assign a variable <var>$language_data</var>.
Though still, there's a lot of indices to that array... but this section is here to break each index down
and explain it to you.</p>

<h4 id="language-file-conventions">4.2: Language File Conventions</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-sections">Next</a> | <a href="#language-file-example">Previous</a></div>

<p>There are several conventions that are used in language files. For ease of use and readability, your language
files should obey the following rules:</p>

<ul>
	<li><strong>Indentation is in <em>tabs</em>, not spaces:</strong> Use tabs! There's no excuse for using
	spaces in this day and age, where almost every good editor allows you to change the tab width. Tabs also
	take up less space, and ensure proper alignment. When you indent, use tabs, and if your editor converts
	tabs to spaces, tell it not to.</li>
	<li><strong>Strings are in single quotes:</strong> Every string in a language file should be in single quotes ('),
	unless you are specifying a single quote as a quotemark or escape character, in which case they can be in double
	quotes for readability; or if you are specifying a REGEXP (see below)</li>
	<li><strong>Large arrays are multi-lined:</strong> An array with more than three or four values should be broken
	into multiple lines. In any case, lines should not be wider than a full-screen window (about 100 chars per line max).</li>
	<li><strong>Ending brackets for multi-lined arrays on a new line:</strong> Also with a comma after them, unless the
	array is the last one in a parent array. See the PHP language file for examples of where to use commas.</li>
	<li><strong>Use GeSHi's constants:</strong> For capatalisation, regular expressions etc. use the GeSHi constants, <em>not</em>
	their actual values.</li>
</ul>

<p>There are more notes on each convention where it may appear in the language file sections below.</p>

<h4 id="language-file-sections">4.3: Language File Sections</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-header">Next</a> | <a href="#language-file-conventions">Previous</a></div>

<p>This section will look at all the sections of a language file, and how they relate to the final highlighting
result.</p>

<h5 id="language-file-header">4.3.1: The Header</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-start-indices">Next</a> | <a href="#language-file-sections">Previous</a></div>

<p>The <em>header</em> of a language file is the first lines with the big comment and the start of the variable
<var>$language_data</var>:</p>

<pre>&lt;?php
/*************************************************************************************
 * &lt;name-of-language-file.php&gt;
 * ---------------------------------
 * Author: &lt;name&gt; (&lt;e-mail address&gt;)
 * Copyright: (c) 2004 &lt;name&gt; (&lt;website URL&gt;)
 * Release Version: 1.0.0
 * CVS Revision Version: $Revision: 1.16.2.1 $
 * Date Started: &lt;date started&gt;
 * Last Modified: $Date: 2006/06/21 10:35:33 $
 *
 * &lt;name-of-language&gt; language file for GeSHi.
 *
 * &lt;any-comments...&gt;
 *
 * CHANGES
 * -------
 * &lt;date-of-release&gt; (1.0.0)
 *  -  First Release
 *
 * TODO (updated &lt;date-of-release&gt;)
 * -------------------------
 * &lt;things-to-do&gt;
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
</pre>

<p>The parts in angle brackets are the parts that you change for your language file. <strong>Everything
else *must* remain the same!</strong></p>

<p>Here are the parts you should change:</p>

<ul>
	<li><tt>&lt;name-of-language-file.php&gt;</tt> - This should become the name of your language file.
	Language file names are in lower case and contain only alphanumeric characters, dashes and underscores.
	Language files end with .php (which you should put with the name of your language file, eg language.php)</li>
	<li><tt>&lt;name&gt;</tt> - Your name, or alias.</li>
	<li><tt>&lt;e-mail address&gt;</tt> - Your e-mail address. If you want your language file included with
	GeSHi you <em>must</em> include an e-mail address that refers to an inbox controlled by you.</li>
	<li><tt>&lt;website&gt;</tt> - A URL of a website of yours (perhaps to a page that deals with your
	contribution to GeSHi, or your home page/blog)</li>
	<li><tt>&lt;date-started&gt;</tt> - The date you started working on the language file. If you can't
	remember, guestimate.</li>
	<li><tt>&lt;name-of-language&gt;</tt> - The name of the language you made this language file for
	(probably similar to the language file name).</li>
	<li><tt>&lt;any-comments&gt;</tt> - Any comments you have to make about this language file, perhaps
	on where you got the keywords for, what dialect of the language this language file is for etc etc.
	If you don't have any comments, remove the space for them.</li>
	<li><tt>&lt;date-of-release</tt> - The date you released the language file to the public. If you simply
	send it to me for inclusion in a new GeSHi and don't release it, leave this blank, and I'll replace
	it with the date of the GeSHi release that it is first added to.</li>
</ul>

<p>Everything should remain the same, including <tt>$Revision: 1.16.2.1 $</tt> and <tt>$Date: 2006/06/21 10:35:33 $</tt> (I know these may
look funny but they have their purpose for those of you who don't know about CVS).</p>

<p><strong>Also:</strong> I'm not sure about the copyright on a new language file. I'm not a lawyer, could
someone contact me about whether the copyright for a new language file should be exclusivly the authors,
or joint with me (if included in a GeSHi release)?</p>

<h5 id="language-file-start-indices">4.3.2: The First Indices</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-keywords">Next</a> | <a href="#language-file-header">Previous</a></div>

<p>Here is an example from the php language file of the first indices:</p>

<pre>	'LANG_NAME' => 'PHP',
	'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
	'COMMENT_MULTI' => array('/*' => '*/'),
	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
	'QUOTEMARKS' => array("'", '"'),
	'ESCAPE_CHAR' => '\\',</pre>

<p>The first indices are the first few lines of a language file before the KEYWORDS index. These indices specify:</p>

<ul>
	<li><strong>'LANG_NAME'</strong>: The name of the language. This name should be a human-readable version of the
	name (e.g. HTML 4 (transitional) instead of html4trans)</li>
	<li><strong>'COMMENT_SINGLE':</strong> An array of single-line comments in your language, indexed by integers
	starting from 1. A single line comment is a comment that starts at the marker and goes until the end of the line.
	These comments may be any length > 0, and since they can be styled individually, can be used for other things than
	comments (for example the Java language file defines "import" as a single line comment). If you are making
	a language that uses a ' (apostrophe) as a comment (or in the comment marker somewhere), use double quotes. e.g.:
	"'"</li>
	<li><strong>'COMMENT_MULTI':</strong> Used to specify multiline comments, an array in the form 'OPEN' => 'CLOSE'.
	Unfortunately, all of these comments you add here will be styled the same way (an area of improvement for GeSHi 1.2.X).
	These comment markers may be any length > 0.</li>
	<li><strong>'CASE_KEYWORDS':</strong> Used to set whether the case of keywords should be changed automatically
	as they are found. For example, in an SQL or BASIC dialect you may want all keywords to be upper case. The accepted
	values for this are:
	<ul>
		<li><tt>GESHI_CAPS_UPPER</tt>: Convert the case of all keywords to upper case.</li>
		<li><tt>GESHI_CAPS_LOWER</tt>: Convert the case of all keywords to lower case.</li>
		<li><tt>GESHI_CAPS_NO_CHANGE</tt>: Don't change the case of any keyword.</li>
	</ul>
	<li><strong>'QUOTEMARKS':</strong> Specifies the characters that mark the beginning and end of a string. This is
	another example where if your language includes the ' string delimiter you should use double quotes around it.</li>
	<li><strong>'ESCAPE_CHAR':</strong> Specifies the escape character used in all strings. If your language does not
	have an escape character then make this the empty string (<tt>''</tt>). This is not an array! If found, any character
	after an escape character and the escape character itself will be highlighted differently, and the character after
	the escape character cannot end a string.</li>
</ul>

<h5 id="language-file-keywords">4.3.3: Keywords</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-symbols-case">Next</a> | <a href="#language-file-start-indices">Previous</a></div>

<p>Keywords will make up the bulk of a language file. In this part you add keywords for your language, including
inbuilt functions, data types, predefined constants etc etc.</p>

<p>Here's a (shortened) example from the php language file:</p>

<pre>	'KEYWORDS' => array(
		1 => array(
			'include', 'require', 'include_once', 'require_once',
			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch',
			'return', 'break'
			),
		2 => array(
			'null', '__LINE__', '__FILE__',
			'false', '&lt;?php', '?&gt;', '&lt;?',
			'&lt;script language=', '&lt;/script&gt;',
			'true', 'var', 'default',
			'function', 'class', 'new',
			'__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
			'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
			'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
			'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
			'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
			'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
			'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
			),
		3 => array(
			'zlib_get_coding_type','zend_version','zend_logo_guid','yp_order','yp_next',
			'yp_match','yp_master','yp_get_default_domain','yp_first','yp_errno','yp_err_string',
			'yp_cat','yp_all','xml_set_unparsed_entity_decl_handler','xml_set_start_namespace_decl_handler','xml_set_processing_instruction_handler','xml_set_object',
			'xml_set_notation_decl_handler','xml_set_external_entity_ref_handler','xml_set_end_namespace_decl_handler','xml_set_element_handler','xml_set_default_handler','xml_set_character_data_handler',
			'xml_parser_set_option','xml_parser_get_option','xml_parser_free','xml_parser_create_ns','xml_parser_create','xml_parse_into_struct'
			)
		),</pre>

<p>You can see that the index 'KEYWORDS' refers to an array of arrays, indexed by positive integers. In each array, there
are some keywords (in the actual php language file there is in fact many more keywords in the array indexed by 3). Here
are some points to note about these keywords:</p>

<ul>
	<li><strong>Indexed by positive integers:</strong> Use nothing else! I may change this in 1.2.X, but for the 1.0.X
	series, use positive integers only.</li>
	<li><strong>Keywords sorted in reverse:</strong> Keywords *should* be sorted in <em>reverse order</em>. I know that
	many of the language files I've made do not follow this rule, but that's because I made the files before I discovered
	the following issue with GeSHi: If you have two keywords, <strong>as</strong> and <strong>asc</strong>for example,
	then when GeSHi encounters the &quot;as&quot; keyword it will be highlighted <strong>even if the &quot;as&quot; is
	part of &quot;asc&quot;</strong>. I would get GeSHi to reverse-sort keyword arrays, but there's no harm in you
	doing this yourself and saving some processing time. At the least (and in fact this is sufficient) you should
	swap any keywords you come across that would be caught by this issue.</li>
	<li><strong>Keywords are case sensitive (sometimes):</strong> If your language is case-sensitive, the correct
	casing of the keywords is defined as the case of the keywords in these keyword arrays. If you check the java
	language file you will see that everything is in exact casing. So if any of these keyword arrays are case
	sensitive, put the keywords in as their correct case! (note that which groups are case sensitive and which are
	not is configurable, see later on)</li>
	<li><strong>Keywords must be in <tt>htmlentities()</tt> form:</strong> All keywords should be written as if they
	had been run through the php function <tt>htmlentities()</tt>. E.g, the keyword is <tt>&amp;lt;foo&amp;gt;</tt>, not
	<tt>&lt;foo&gt;</tt></li>
	<li><strong>Don't use keywords to highlight symbols:</strong> Just don't. It doesn't work, and there will be seperate
	support for symbols later.</li>
	<li><strong>Markup Languages are special cases:</strong> Check the html4strict language file for an example: keywords
	have to be specified twice for opening tags and twice for each closing tag.</li>
</ul>

<h5 id="language-file-symbols-case">4.3.4: Symbols and Case Sensitivity</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-styles">Next</a> | <a href="#language-file-keywords">Previous</a></div>

<p>So you've put all the keywords for your language in? Now for a breather before we style them :). Symbols define
what symbols your language uses, these are things like colons, brackets/braces, and other such general punctuation (it's
important to note that in the 1.0.X series these will <em>not</em> be used), and case sensitivity alludes to the previous
section: here you can set which keyword groups are case sensitive.</p>

<p>Here's an example:</p>

<pre>	'SYMBOLS' => array(
		'(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
		),
	'CASE_SENSITIVE' => array(
		GESHI_COMMENTS => false,
		1 => false,
		2 => false,
		3 => false,
		),</pre>

<ul>
	<li><strong>'SYMBOLS':</strong> An array of the symbols used in your language. <em>Please note that in 1.0.X these
	are not used.</em> Hopefully they will be used in 1.2.X.</li>
	<li><strong>'CASE_SENSITIVE':</strong> Note the <tt>GESHI_COMMENTS</tt>! This is used to set whether comments
	are case sensitive or not (for example, BASIC has the REM statement which while not being case sensitive is still
	alphanumeric, and as in the example given before about the Java language file using &quot;import&quot; as a single line comment,
	this can be useful sometimes. <tt>true</tt> if comments are case sensitive, <tt>false</tt> otherwise. All of the other
	indices correspond to indices in the <tt>'KEYWORDS'</tt> section (see above).</li>
</ul>

<h5 id="language-file-styles">4.3.5: Styles for your Language File</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-urls">Next</a> | <a href="#language-file-symbols-case">Previous</a></div>

<p>This is the fun part! Here you get to choose the colours, fonts, backgrounds and anything else you'd like for your
language file.</p>

<p>Here's an example:</p>

<pre>	'STYLES' => array(
		'KEYWORDS' => array(
			1 => 'color: #b1b100;',
			2 => 'color: #000000; font-weight: bold;',
			3 => 'color: #000066;'
			),
		'COMMENTS' => array(
			1 => 'color: #808080; font-style: italic;',
			2 => 'color: #808080; font-style: italic;',
			'MULTI' => 'color: #808080; font-style: italic;'
			),
		'ESCAPE_CHAR' => array(
			0 => 'color: #000099; font-weight: bold;'
			),
		'BRACKETS' => array(
			0 => 'color: #66cc66;'
			),
		'STRINGS' => array(
			0 => 'color: #ff0000;'
			),
		'NUMBERS' => array(
			0 => 'color: #cc66cc;'
			),
		'METHODS' => array(
			0 => 'color: #006600;'
			),
		'SYMBOLS' => array(
			0 => 'color: #66cc66;'
			),
		'REGEXPS' => array(
			0 => 'color: #0000ff;'
			),
		'SCRIPT' => array(
			0 => '',
			1 => '',
			2 => '',
			3 => ''
			)
		),</pre>

<p>Note that all style rules should end with a semi-colon! This is important: GeSHi may add extra rules to the rules
you specify (and will do so if a user tries to change your styles on the fly), so the last semi-colon in any stylesheet
rule is important.</p>

<p>All strings here should contain valid stylesheet declarations (it's also find to have the empty string).</p>

<ul>
	<li><strong>'KEYWORDS':</strong> This is an array, from keyword index to style. The index you use is the index
	you used in the keywords section to specify the keywords belonging to that group.</li>
	<li><strong>'COMMENTS':</strong> This is an array, from single-line comment index to style for that index. The
	index 'MULTI' is used for multiline comments (and cannot be an array)</li>
	<li><strong>'ESCAPE_CHAR' down to 'REGEXPS':</strong> These are arrays with only one index: 0. You cannot add other indices to
	these arrays.</li>
	<li><strong>'SCRIPT':</strong> For languages that use script delimiters, this is where you can style each block
	of script. For example, HTML and XML have blocks that begin with &lt; and end with &gt; (i.e. tags) and blocks
	that begin with &amp; and end with ; (i.e. character entities), and you can set a style to apply to each whole
	block. You specify the delimiters for the blocks below. Note that many languages will not need this feature.</li>
</ul>

<h5 id="language-file-urls">4.3.6: URLs for Functions</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-oo-support">Next</a> | <a href="#language-file-styles">Previous</a></div>

<p>This section lets you specify a url to visit for each keyword group. Useful for pointing functions at their
online manual entries.</p>

<p>Here is an example:</p>

<pre>	'URLS' => array(
		1 => '',
		2 => '',
		3 => 'http://www.php.net/{FNAME}',
		4 => ''
		),</pre>

<p>The indices of this array correspond to the keyword groups you specified in the keywords section. The string <tt>{FNAME}</tt>
marks where the name of the function is substituted in. So for the example above, if the keyword being highlighted is &quot;echo&quot;,
then the keyword will be a URL pointing to <tt>http://www.php.net/echo</tt>. Because some languages (Java!) don't keep a
uniform URL for functions/classes, you may have trouble in creating a URL for that language (though look in the java language
file for a novel solution to it's problem)</p>

<h5 id="language-file-oo-support">4.3.7: Object Orientation Support</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-regexps">Next</a> | <a href="#language-file-urls">Previous</a></div>

<p>Now we're reaching the most little-used section of a language file, which includes such goodies as object orientation
support and context support. GeSHi can highlight methods and data fields of objects easily, all you need to do is to
tell it to do so and what the &quot;splitter&quot; is between object/method etc.</p>

<p>Here's an example:</p>

<pre>	'OOLANG' => true,
	'OBJECT_SPLITTER' => '-&gt;',</pre>

<p>If your language has object orientation, the value of <tt>'OOLANG'</tt> is true, otherwise it is false. If it is
object orientated, in the <tt>'OBJECT_SPLITTER'</tt> value you put the <tt>htmlentities()</tt> version of the &quot;splitter&quot;
between objects and methods/fields. If it is not, then make this the empty string.</p>

<h5 id="language-file-regexps">4.3.8: Using Regular Expressions</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-strict-mode">Next</a> | <a href="#language-file-oo-support">Previous</a></div>

<p>Regular expressions are a good way to catch any other lexic that fits certain rules but can't be listed as a keyword.
A good example is variables in PHP: variables always start with either one or two &quot;$&quot; signs, then alphanumeric
characters (a simplification). This is easy to catch with regular expressions.</p>

<p>And new to version 1.0.2, there is an advanced way of using regular expressions to catch certain things but highlight
only part of those things. This is particularly useful for languages like XML.</p>

<div class="caution"><div class="caution-header">Caution:</div><p>Regular expressions use the PCRE syntax (perl-style), <em>not</em> the ereg() style!</p></div>

<p>Here is an example (this time the PHP file merged with the XML file):</p>

<pre>		0 => array(
			GESHI_SEARCH => '(((xml:)?[a-z\-]+))(=)',
			GESHI_REPLACE => '\\1',
			GESHI_MODIFIERS => '',
			GESHI_BEFORE => '',
			GESHI_AFTER => '\\4'
			),
		1 => array(
			GESHI_SEARCH => '(&lt;/?[a-z0-9]*(&gt;)?)',
			GESHI_REPLACE => '\\1',
			GESHI_MODIFIERS => '',
			GESHI_BEFORE => '',
			GESHI_AFTER => ''
			),
		2 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"</pre>

<p>As you can see there are two formats. One is the &quot;simple&quot; format used in GeSHi &lt; 1.0.2, and the other
is a more advanced syntax. Firstly, the simple syntax:</p>

<ul>
	<li><strong>May be in double quotes:</strong> To make it easier for those who always place their regular expressions
	in double quotes, you may place any regular expression here in double quotes if you wish.</li>
	<li><strong>Don't use curly brackets where possible:</strong> If you want to use curly brackets (<tt>()</tt>) then
	by all means give it a try, but I'm not sure whether under some circumstances GeSHi may throw a wobbly. You have
	been warned! If you want to use brackets, it would be better to use the advanced syntax.</li>
	<li><strong>Don't use the &quot;everything&quot; regex:</strong> (That's the <tt>.*?</tt> regex). Use advanced
	syntax instead.</li>
</ul>

<p>And now for advanced syntax, which gives you much more control over exactly what is highlighted:</p>

<ul>
	<li><strong>GESHI_SEARCH:</strong> This element specifies the regular expression to search for. If you plan
	to capture the output, use brackets (<tt>()</tt>). See how in the first example above, most of the regular
	expression is in one set of brackets (with the equals sign in other brackets). You should make sure that the
	part of the regular expression that is supposed to match what is highlighted is in brackets.</li>
	<li><strong>GESHI_REPLACE:</strong> This is what the stuff matched by the regular expression will be replaced
	with. If you've grouped the stuff you want highlighted into brackets in the GESHI_SEARCH element, then you can
	use <tt>\\number</tt> to match that group, where <tt>number</tt> is a number corresponding to how many open brackets
	are between the open bracket of the group you want highlighted and the start of the GESHI_SEARCH string + 1. This
	may sound confusing, and it probably is, but if you're familiar with how PHP's regular expressions work you
	should understand. In the example above, the opening bracket for the stuff we want highlighted is the very first
	bracket in the string, so the number of brackets before that bracket and the start of the string is 0. So we add
	1 and get our replacement string of <tt>\\1</tt> <span style="font-size: 80%">(whew!)</span>.<br />&nbsp;<br />If you
	didn't understand a word of that, make sure that there are brackets around the string in GESHI_SEARCH and use
	\\1 for GESHI_REPLACE ;)</li>
	<li><strong>GESHI_MODIFIERS:</strong> Specify modifiers for your regular expression. If your regular expression includes
	the everything matcher (<tt>.*?</tt>), then your modifiers should include &quot;s&quot; and &quot;i&quot; (e.g. use
	'si' for this).</li>
	<li><strong>GESHI_BEFORE:</strong>Specifies a bracket group that should appear before the highlighted match (this
	bracketed group will not be highlighted). Use this if you had to match what you wanted by matching part of your
	regexp string to something before what you wanted to highlight, and you don't want that part to disappear in
	the highlighted result.</li>
	<li><strong>GESHI_AFTER:</strong>Specifies a bracket group that should appear after the highlighted match (this
	bracketed group will not be highlighted). Use this if you had to match what you wanted by matching part of your
	regexp string to something after what you wanted to highlight, and you don't want that part to disappear in
	the highlighted result.</li>
</ul>

<p>Is that totally confusing? Here's the test for if you're an android or not: If you found that perfectly understandable
then you're an android ;). Here's a better example:</p>

<p>Let's say that I'm making a language, and variables in this language always start with a dollar sign ($), are always
written in lowercase letters and always end with an ampersand (&amp;). eg:</p>

<code>$foo& = 'bar'</code>

<p>I want to highlight <em>only the text between the $ and the &amp;</em>. How do I do that? With simple regular
expressions I can't, but with advanced, it's relatively easy:</p>

<pre>		1 => array(
			GESHI_SEARCH => '(\$)([a-z]+)(&amp;)',   // search for a dollar sign, then one or more of the characters a-z, then an ampersand
			GESHI_REPLACE => '\\2',                  // we wanna highlight the characters, which are in the second bracketed group
			GESHI_MODIFIERS => '',                   // no modifiers, since we're not matching the &quot;anything&quot; regex
			GESHI_BEFORE => '\\1',                   // before the highlighted characters should be the first bracketed group (always a dollar sign in this example)
			GESHI_AFTER => '\\3'                     // after the highlighted characters should be the third bracketed group (always an ampersand in this example)
			),</pre>

<p>So if someone tried to highlight using my language, all cases of $foo& would turn into:</p>

<code>$&lt;span style=&quot;color: blue;&quot;&gt;foo&lt;/span&gt;&amp;</code>

<p>(which would of course be viewed in a browser to get something like <tt>$<span style="color: blue;">foo</span>&amp;</tt>)</p>

<h5 id="language-file-strict-mode">4.3.9: Contextual Highlighting and Strict Mode</h5>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#language-file-tidying-up">Next</a> | <a href="#language-file-regexps">Previous</a></div>

<p>For languages like HTML, it's good if we can highlight a tag (like &lt;a&gt; for example). But how do we stop
every single &quot;a&quot; in the source getting highlighted? What about for attributes? If I've got the word
&quot;colspan&quot; in my text I don't want that highlighted! So how do you tell GeSHi not to highlight in that
case? You do it with &quot;Strict Blocks&quot;.</p>

<p>Here is an example:</p>

<pre>	'STRICT_MODE_APPLIES' => GESHI_MAYBE,
	'SCRIPT_DELIMITERS' => array(
		0 => array(
			'&lt;?php' =&gt; '?&gt;'
			),
		1 => array(
			'&lt;?' =&gt; '?&gt;'
			),
		2 => array(
			'&lt;%' =&gt; '%&gt;'
			),
		3 => array(
			'&lt;script language="php"&gt;' =&gt; '&lt;/script&gt;'
			)
		),
	'HIGHLIGHT_STRICT_BLOCK' => array(
		0 => true,
		1 => true,
		2 => true,
		3 => true
		)</pre>

<p>What is strict mode? Strict mode says that highlighting only occurs inside the blocks you specify. You can see from
the example above that highlighting will only occur if the source is inside &lt;?php ... ?&gt; (though note the <tt>GESHI_MAYBE</tt>!).
Here are some points about strict highlighting:</p>
<ul>
	<li><strong>'STRICT_MODE_APPLIES':</strong> This takes three values (all constants):
	<ul>
		<li><tt>GESHI_ALWAYS</tt>: Strict mode always applies for all of the blocks you specify. Users of
		your language file cannot turn strict mode off. This should be used for markup languages.</li>
		<li><tt>GESHI_NEVER</tt>: Strict mode is never used. Users of your language file cannot turn strict mode
		on. Use this value if there is no such thing as a block of code that would not be highlighted in
		your language (most languages, like C, Java etc. use this because anything in a C file should be highlighted).</li>
		<li><tt>GESHI_MAYBE</tt>: Strict mode *sometimes* applies. It defaults to &quot;off&quot;. Users can turn
		strict mode on if they please. If strict mode is off then everything in the source will be highlighted, even
		things outside the strict block markers. If strict mode is on the nothing outside strict block markers will
		be highlighted.</li>
	</ul>
	<li><strong>SCRIPT_DELIMITERS:</strong> This is an array of script delimiters, in the format of the above. The indices are
	use in the 'SCRIPT' part of the styles section for highlighting everything in a strict block in a certain way. For example,
	you could set up your language file to make the background yellow of any code inside a strict block this way. The delimiters
	are in the form 'OPEN' => 'CLOSE'. Delimiters can be of any length > 0. Delimiters are <em>not</em> formatted as if they
	were run through <tt>htmlentities()</tt>!</li>
	<li><strong>'HIGHLIGHT_STRICT_BLOCK':</strong> specifies whether any highlighting should go on inside each block. Most
	of the time this should be true, but for example, in the XML language file highlighting is turned off for blocks beginning
	with &lt;!DOCTYPE and ending with &gt;. However, you can still style the overall block using the method described above,
	and the XML language file does just that.</li>
</ul>

<div class="note"><div class="note-header">Note:</div><p>The delimiters should be in <em>reverse alphabetical order</em>. Note that in the above example,
<strong>&lt;?php</strong> comes before <strong>&lt;?</strong>.</p></div>

<h4 id="language-file-tidying-up">4.3.10: Tidying Up</h4>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a href="#method-constant-reference">Next</a> | <a href="#language-file-strict-mode">Previous</a></div>

<p>All language files should end with:</p>

<pre>);

?></pre>


<h3 id="method-constant-reference">5: Method/Constant Reference</a></h3>
<div class="nav"><a href="#top">Top</a> | <a href="#contents">Contents</a> | <a>Next</a> | <a href="#language-file-tidying-up">Previous</a></div>

<p>I'm afraid I have been lying for a little while about this now! Since 1.0.7 I have been including a phpdoc API for
the sourcecode in the <a href="api/index.html">api</a> directory, but have forgot to update the documentation! However, it is
available, and may assist you in coding, especially for plugin coders.</p>

<hr />

<p>That's all, folks!</p>

<p>I've improved the documentation greatly from version 1.0.1, but there may still be
problems with it, or it may still be confusing for you. Or perhaps I was just plain
wrong about one point! If so, contact me and I'll do my best to sort it out.</p>

<p>In case you were wondering, I've finished development of the 1.0.X thread of
GeSHi. The only releases I'll make in this thread will be of the bug-fix/add language files
type. In particular, version 1.0.2 was a &quot;concept&quot; release - testing how
far I could take the highlighting idea (as well as ideas from others).</p>

<p>I'm planning a code rewrite for 1.2.X, which will be based on a new engine - a
&quot;psuedo-tokenizer&quot; engine. Hopefully it will massively reduce the server
load and time taken (by almost eliminating regexps), while providing superior
highlighting. But fear not! The interface and method names should all remain the
same ^_^ (though I can't say the same for language files!)</p>

<p>And finally, a couple of people have been asking me: how did you generate that documentation?
The amazing answer is: my brain. And yes, it took a long time, and I don't reccommend doing it this
way. And yes, you can borrow the styles if you like, though flick me an e-mail if you do.</p>

<p>Anyway, enough blather from me. Get GeSHi working for you already! :D</p>

<pre>Nigel McNie
<a href="mailto:hide@address.com">hide@address.com</a>
<a href="http://qbnz.com/highlighter/">http://qbnz.com/highlighter/</a></pre>

</body>
</html>
Return current item: GeSHi