title: Replace utf8 literals in string
body: <p>I am receiving from an external service a string with some utf8 literal in it.</p>
  
  <pre><code>$a = $param1;
  echo $a;
  
  \xe7\xe3
  </code></pre>
  
  <p>How can I convert $a (an utf8 string with 8 characters) to 'çã'? </p>
  
  <p>I know I can use strtr with a map of substitutions, but I think that maybe there is a better way. </p>
  
  <p>Simplifying the example, I have a simple web page:</p>
  
  <pre><code>&lt;?php
  echo '&lt;html&gt;&lt;body&gt;'.$_GET['aa'].'&lt;/body&gt;&lt;/html&gt;';
  </code></pre>
  
  <p>And I call it with <code>?aa=\xe7\xe3</code> parameter</p>
  
  <p>The browser shows <code>\xe7\xe3</code> but I want to show <code>çã</code> like if I had declared with double quotes <code>"\xe7\xe3"</code>. </p>