title: php json_encode big array
body: <p>I am trying to use <code>json_encode</code> on a big array, and the result returns nothing (yes, I checked that it is utf-8). When I started to investigate this issue I found that the problem arise when a string becomes bigger than 65536.</p>
  
  <p>So when my array is of size 1245, its string from <code>json_encode</code> has length of string(65493), but when I increase array by just one, the string becomes longer than 65536, json_encode fails to output any result.</p>
  
  <p>I thought that the problem is because of <code>memory limit</code>, but when I checked my php.ini I see that it is -1. </p>
  
  <p>Any idea what can be a problem?</p>
  
  <p>Basically I am doing something like this:</p>
  
  <pre><code>$arr = array();
  for($i =0; $i&lt;9000; $i++){
      $arr[] = array(
          'name'  =&gt; 'test',
          'str'   =&gt; md5($i)
      );
  }
  echo '&lt;pre&gt;'.json_encode($arr).'&lt;/pre&gt;';
  </code></pre>
  
  <p><strong>P.S.</strong> sorry guys. I found the problem, thanks to a person with an unreprintable name :-) (thank your Lawrence).
  <code>&lt;pre&gt;</code> is the culprit... for some reason it does not print the string in my browser, but it is there.</p>
  
  <p>Lawrence, if you want, you can just write it and I will accept it as correct. Because you were the reason that I came up with this.</p>