Loader

quotemeta

Returns a version of str with a backslash character (\) before every character that is among these: . \ + * ? [ ^ ] ( $ )
Test quotemeta online.

string quotemeta ( string $str )

PHP Documentation by the PHP Documentation Group


quotemeta

(PHP 4, PHP 5, PHP 7)

quotemetaQuote meta characters

Description

string quotemeta ( string $str )

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

. \ + * ? [ ^ ] ( $ )

Parameters

str

The input string.

Return Values

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

Notes

Note: This function is binary-safe.

See Also


PHP Documentation

Copyright © 1997 - 2016 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution 3.0 License or later. A copy of the Creative Commons Attribution 3.0 license is distributed with this manual. The latest version is presently available at » http://creativecommons.org/licenses/by/3.0/.