var IDENT_RE  	      = '[a-zA-Z][a-zA-Z0-9_]*';
var C_NUMBER_RE       = '\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)';
var PHP_KEYWORDS      = { 'function': 1, 'global': 1, 'return': 1, 'while': 1, 'do': 1, 'else': 1, 'foreach': 1, 'if': 1, 'var': 1, 'chr': 1, 'isset': 1, 'and': 1, 'or': 1, 'not': 1, 'array': 1, 'as': 1, 'unset': 1, 'elseif': 1, 'for': 1, 'xor': 1, 'not': 1, 'class': 1, 'die': 1, 'print': 1, 'echo': 1, 'new': 1 };
var PHP_IDENTIFIER_RE = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*';

LANGUAGES.php = {
  defaultMode: {
    lexems: [IDENT_RE],
    contains: ['comment', 'number', 'string', 'variable', 'require', 'eof', 'repeat', 'define'],
    keywords: PHP_KEYWORDS
  },
  case_insensitive: true,
  modes: [
    {
      className: 'comment',
      begin: '//', end: '$',
      relevance: 0
    },
    {
      className: 'comment',
      begin: '#', end: '$'
    },
    {
      className: 'comment',
      begin: '/\\*', end: '\\*/'
    },
    {
      className: 'number',
      begin: C_NUMBER_RE, end: '^|$',
      relevance: 0
    },
    {
      className: 'string',
//      begin: '\'', end: '\'',
      begin: '\\\'', end: '(^|[^\\\\])\\\'',
      contains: ['variable'],
      relevance: 0
    },
    {
      className: 'string',
//      begin: '"', end: '"',
      begin: '"', end: '(^|[^\\\\])"',
      contains: ['variable'],
      relevance: 0
    },
    {
      className: 'variable',
      begin: '\\$' + PHP_IDENTIFIER_RE, end: '^'
    },
    {
      className: 'require',
      begin: '\\b(require|require_once|include|include_once)\\b', end: '^'
    },
    {
      className: 'eof',
      begin: '\\bEOF\\b', end: '^'
    },
    {
      className: 'repeat',
      begin: '(@|&)', end: '^'
    },
    {
      className: 'define',
      begin: '\\b(define|error_reporting)\\b', end: '^'
    }
  ]
};//php

if(refreshing==1) { updated['php'] = 1; }
