PHP - quotemeta 函数



语法

string quotemeta ( string $str )

定义和用法

用于引用元字符

返回值

成功时返回带有元字符的字符串,失败时返回 false

参数

序号 参数及描述
1

字符串

字符串输入

示例

尝试以下示例

<?php
   $input = "Tutorials point. (simply easy learning)";
   
   echo quotemeta($input);
?>

这将产生以下结果:

Tutorials point\. \(simply easy learning\)
php_function_reference.htm
广告
© . All rights reserved.