How to convert preg_replace to preg_replace_callback?
<p>I have been working on an old project. During the coding I met with the following function that is throwing error(use preg_replace_callback instead preg_replace). I tried to convert it from preg_replace to preg_replace_callback but getting the error. </p>

<p>Can you please help me in converting the below using preg_replace_callback. Thank you in advance.</p>

<pre><code>function deescapeString($s) {

    $torepl = array("/\\\(\d{1,3})/e" =&gt; "chr(octdec(\\1))",
                    "/\\\\\(/" =&gt; "(",
                    "/\\\\\)/" =&gt; ")");

      return preg_replace(array_keys($torepl),$torepl,$s);

}
</code></pre>