some unclear php "symbolics"
Posted
by serhio
on Stack Overflow
See other posts from Stack Overflow
or by serhio
Published on 2010-04-08T22:24:03Z
Indexed on
2010/04/08
22:33 UTC
Read the original article
Hit count: 352
I am a php beginner and seed on the forum such a php expression:
$regex = <<<'END'
/
( [\x00-\x7F] # single-byte sequences 0xxxxxxx
| [\xC0-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
| [\xE0-\xEF][\x80-\xBF]{2} # triple-byte sequences 1110xxxx 10xxxxxx * 2
| [\xF0-\xF7][\x80-\xBF]{3} # quadruple-byte sequence 11110xxx 10xxxxxx * 3
)
| ( [\x80-\xBF] ) # invalid byte in range 10000000 - 10111111
| ( [\xC0-\xFF] ) # invalid byte in range 11000000 - 11111111
/x
END;
is this code correct? what should mean some strange (4 me) constructions like <<<
'END'
/
/x
and END;
thanks
© Stack Overflow or respective owner