Home  >  Article  >  Backend Development  >  Notes on php character escaping

Notes on php character escaping

WBOY
WBOYOriginal
2016-07-25 09:05:54973browse
  1. $str = "ffff -----------------------
  2. 9 102 102 102 102 0 102 102 102 102
  3. 2. Examples of replacing special characters

$str = "ffff ----------------------- 8 102 102 102 102 102 102 102 102

Three, octal ascii code example:

  1. //Note that a string that conforms to the regular pattern [0-7]{1,3} represents an octal ASCII code.
  2. $str = " ----------------------- 11 0 1 2 3 7 8 9 0 56 92 56
  3. 4. Example of hexadecimal ascii code:
$str = "x0x1x2x3x7x8x9x10x11xff";
echo(strlen($str)); echo("n"); for($i=0;$iecho("n");

Copy code
    Output result: ----------------------- 10 0 1 2 3 7 8 9 16 17 255
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn