Home > Backend Development > PHP Tutorial > 【PHP】遇到了一些特殊字符 "ESC" "BEL"

【PHP】遇到了一些特殊字符 "ESC" "BEL"

WBOY
Release: 2016-06-20 12:32:20
Original
3368 people have browsed it

我这里有一段代码

$str =strtr($str,array(    "\n"  => "\\n",    "" => " ",    "" => " "));
Copy after login

实际上数组上那两个并不为空格字符,可以把代码拷贝到sublime text里面去显示,就会发现如下图所示



这里有个问题,
我们如何打出这两个字符呢?
这些个字符分别代表什么意义?


回复讨论(解决方案)

ESC chr(27) 0x1b 转义
BEL chr(7) 0x07 响铃
都是 ASCII 控制符

谢谢啦,我刚刚也找到答案了.

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template