Home > Backend Development > PHP Tutorial > PHP character escaping precautions_PHP tutorial

PHP character escaping precautions_PHP tutorial

WBOY
Release: 2016-07-21 15:46:46
Original
839 people have browsed it

In php:

* PHP string with single quotes as delimiter, supports two escapes ' and \
* PHP with double quotes as delimiter String, supports the following escapes:
n Line feed (LF or ASCII character 0x0A (10))
r Carriage return (CR or ASCII character 0x0D (13))
t Horizontal tab (HT or ASCII character 0x09 (9))
\ backslash
$ dollar sign
" double quote
[0-7]{1,3} This regular expression sequence matches an octal symbol The character
x[0-9A-Fa-f]{1,2} This regular expression sequence matches a character represented in hexadecimal notation

to give a few examples:

A containing



http://www.bkjia.com/PHPjc/320090.html

www.bkjia.com

true

http: //www.bkjia.com/PHPjc/320090.html

TechArticle

In php: * PHP string with single quotes as delimiter, supports two escapes ' and \ * PHP string delimited by double quotes, supports the following escapes: n Newline (LF or ASCII character...



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