* PHP string with single quotation mark delimiter, support two escape \ ' and \
* A PHP string with double quotes as delimiters that supports the following escapes:
\ n line Wrap (LF or ASCII character 0x0A (10))
\ r Carriage return (CR or ASCII character 0x0D (13))
\ t Horizontal tab (HT or ASCII character 0x09 (9))
\ reverse Slash
\$ dollar Sign
\ "Double Quotes
\[0-7]{1,3} This regular expression sequence matches a character represented by a octal symbol
\x[0-9a-fa-f]{1,2} This regular expression sequence matches a character represented in hexadecimal notation
Note that the string that conforms to the regular \[0-7]{1,3} represents an octal ASCII code.
$str = "\0\01\02\3\7\10\011\08\8"; The \8 here are not compliant and are amended to "\\8" (ASCII is 92 and 56)
Echo (strlen ($STR));
Echo ("\ n");
For ($i =0 $i <strlen ($STR); $i + +) echo ("\ T". Ord ($str {$i}));
Echo ("\ n");
Output results:
----------------------
11
0 1 2 3 7 8 9 0 56 92 56
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.