for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Manticoresearch;
trait Utils
{
public static function escape($string): string
$from = ['\\', '(',')','|','-','!','@','~','"','&', '/', '^', '$', '=', '<'];
$to = ['\\\\', '\(','\)','\|','\-','\!','\@','\~','\"', '\&', '\/', '\^', '\$', '\=', '\<'];
return str_replace($from, $to, $string);
}