JGCSCS
4
PHP without HTML
*.php;*.php3
JGsoft
support@editpadpro.com
http://www.editpadpro.com
http://www.php.net
TRUE
#
1
Stand-alone PHP code. That is: without HTML.
5
// PHP without HTML
function test($param) {
$number = 1234;
$string = "This is a $test";
}
0
FALSE
11
Bracket
[{}]++
FALSE
FALSE
17
0
0
FALSE
Single-line comment
Note that the PHP closing tag is also considered end-of-line and will stop the comment and the PHP section. We use zero-width positive lookahead (?=...) for the ?> as it is not part of the comment
(//|#).*+
FALSE
FALSE
5
0
0
TRUE
Mutli-line comment
/\*.*?\*/
FALSE
TRUE
5
0
0
TRUE
Unclosed multi-line comment
Multi-line comment that continues until the end of the file. Note that this syntax must be positioned after the properly closed multi-line comment so that the closed comment takes precedence.
/\*.*+
FALSE
TRUE
5
0
0
TRUE
Single-quoted string
'[^'\\\r\n]*+(\\(?:.|$)[^'\\\r\n]*+)*+'?
FALSE
FALSE
9
0
0
TRUE
Double-quoted string
"[^"\\]*+(\\(?:.|$)[^"\\]*+)*+"?
FALSE
TRUE
9
0
0
TRUE
Reserved words
\b(?:__(?:CLASS|FILE|FUNCTION|LINE|METHOD)__|and|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|echo|else(?:if)?|empty|enddeclare|endfor(?:each)?|endif|endswitch|endwhile|eval|exception|exit|extends|for(?:each)?|function|global|if|include(?:_once)?|isset|list|new|old_function|or|php_user_filter|print|require(?:_once)?|return|static|switch|unset|use|var|while|xor)\b
TRUE
FALSE
7
0
0
FALSE
Number
hexadecimal | integer, decimal part, exponent
\b0[xX][A-Fa-f0-9]++|\b[0-9]++(\.[0-9]++)?([eE][+-]?+[0-9]++)?\b
FALSE
FALSE
10
0
0
FALSE
Here document
Properly finished here document. A here document is started by an identifier preceded by << and terminated by the same identifier at the beginning of a line.
<<<([A-Za-z0-9_]+)\b.*?^\1\b
FALSE
TRUE
9
0
0
TRUE
Open here document
Here document with missing terminator
<<<([A-Za-z0-9_]+)\b.*
FALSE
TRUE
9
0
0
TRUE
Operator
[-.[\]()=+*/<>|&!~]++
FALSE
FALSE
13
0
0
FALSE
6
(
)
TRUE
3
[
]
TRUE
3
{
}
TRUE
3
'
'
FALSE
2
"
"
FALSE
5
/*
*/
FALSE
2
1
Interpolated String
0
9
TRUE
1
Variable
Don't forget the negative look-behind (?