Function: preg_replacement_quote()

function preg_replacement_quote(string $str): string;

Function for escaping the special symbols for putting into the regexp pattern as a simple text.

Details

This function escapes all special symbols so that they are treated as a simple text in the replacement.

Parameters

Name Pass type Value type Default value Description
$str by value string

The string to be escaped.

Returns

string

The escaped string.

Authors

Oleg Schildt

Package

Source code

See also