String 函数
PHP 手册

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.

注释

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

参见


String 函数
PHP 手册