escape() публичный статический Метод

The parameter $all is boolean flag that, when set to true, causes the '%' and '_' characters to be escaped as well.
public static escape ( string $string, boolean $all = false ) : string
$string string
$all boolean
Результат string
Пример #1
0
 public function testEscape()
 {
     $this->assertEquals("\\\\\\n\\r\\x00\\x1a\\'\\\"\\%\\_", String::escape("\\\n\r'\"%_", true));
 }