İlgili hatanın bulunduğu satırlar aşağıdadır. Çözümünde destek olabilecek var mıdır?

//        if (is_string($string)) {

//            return "'" . mb_ereg_replace('[\x00\x0A\x0D\x1A\x22\x27\x5C]', '\\\0', $string) . "'";

//        }  
              
//        For other types (int, float, bool), convert to string    

//            return (string)$string;