title: var_dump or print_r and html encoding
body: <pre><code>&lt;?php 
  
  $x = array("&lt;b&gt;","&lt;i&gt;","b","i","&lt;h1&gt;hello&lt;/h1&gt;");
  print_r ($x);
  echo "&lt;hr&gt;";
  var_dump ($x);
  </code></pre>
  
  <p>outputs this in the html source!</p>
  
  <pre><code>Array
  (
      [0] =&gt; &lt;b&gt;
      [1] =&gt; &lt;i&gt;
      [2] =&gt; b
      [3] =&gt; i
      [4] =&gt; &lt;h1&gt;hello&lt;/h1&gt;
  )
  &lt;hr&gt;array(5) {
    [0]=&gt;
    string(3) "&lt;b&gt;"
    [1]=&gt;
    string(3) "&lt;i&gt;"
    [2]=&gt;
    string(1) "b"
    [3]=&gt;
    string(1) "i"
    [4]=&gt;
    string(14) "&lt;h1&gt;hello&lt;/h1&gt;"
  }
  </code></pre>
  
  <p>obviously, I could have been XSS'ed by that!<br>
  How can I make sure that the array values are htmlencoded? </p>