字符串函数
PHP Manual

quotemeta

(PHP 4, PHP 5)

quotemetaQuote meta characters

说明

string quotemeta ( string $str )

Returns a version of str with a backslash character (\) before every character that is among these:

. \ + * ? [ ^ ] ( $ )

参数

str

The input string.

返回值

Returns the string with meta characters quoted, or FALSE if an empty string is given as str.

注释

Note: 此函数可安全用于二进制对象。

参见


字符串函数
PHP Manual