/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.0.320.modified (May 03 2009)
 *
 * @copyright
 * Copyright (C) 2004-2009 Alex Gorbatchev.
 *
 * @license
 * This file is a modified version of shBrushPhp.js which is part of SyntaxHighlighter.
 *
 * SyntaxHighlighter is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * SyntaxHighlighter 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 SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.
 *
 * shBrushPhpLight.js by David Chambers
 * http://davidchambersdesign.com/
 * { last updated: 9 June 2009 }
 */
SyntaxHighlighter.brushes.Php = function()
{
	this.regexList = [

		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,
		    css: 'comments' },

		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,
		    css: 'comments' },

		{ regex: /__(CLASS|FILE|FUNCTION|LINE|METHOD)__/gi,
		    css: 'constant' },

		{ regex: /\b(?:abstract|and|array|as|break|case|class|const|continue|file_get_contents|declare|default|die|do|else(( )?if)?|end(declare|for(each)?|if|switch|while)|extends|false|for(each)?|(c|old_)?function|implements|include(_once)?|global|if|interface|new|(x)?or|private|protected|public|return|static|switch|throw|true|use|require(_once)?|var|while)\b/g,
		    css: 'keyword' },

		{ regex: /(?:&lt;|<)\?(?:php|=)?|\?(?:&gt;|>)/g,
		    css: 'phptag' },

		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,
		    css: 'string' },

		{ regex: /[^$\w](\\"|\\\$|[^"$\n])*(?=("|(\\"|[^"\n])*[^\\]")(((\\"|[^"\n])*[^\\]"){2})*(\\"|[^"\n])*$)(")?/gm,
		    css: 'string' },

		{ regex: /"(?=(((\\"|[^"\n])*[^\\]"){2})*(\\"|[^"\n])*$)/gm,
		    css: 'string' },

		{ regex: /(\d)+(\.(\d)?)?/g,
		    css: 'numval' },

		{ regex: /\$\w+(?=("|(\\"|[^"\n])*[^\\]")(((\\"|[^"\n])*[^\\]"){2})*(\\"|[^"\n])*$)/gm,
		    css: 'varinstr' },

		{ regex: /\$\w+/g,
		    css: 'variable' },

		{ regex: /\w+(?=\()/g,
		    css: 'function' }
	];

	this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
};

SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Php.aliases = ['php'];