title: json encode breaking for large strings
body: <p>I am trying to <code>json encode</code> an well-formed XML string into a SimpleXMLElement object. But what happens is that, it <code>breaks</code> or <code>exit</code>. </p>
  
  <p>I tried with small <code>xml</code> files and works fine and the issue is with large <code>xml</code> files</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;?php
  $directory = "lookup.xml";
  $xmlContent = file_get_contents($directory); // get contents of lookup
  print_r(simplexml_load_string($xmlContent));
  $arrayXml = json_decode(json_encode(simplexml_load_string($xmlContent)),TRUE);
  print_r($arrayXml);
  </code></pre>
  
  <p><code>lookup.xml</code> files :</p>
  
  <pre><code>1. lookup.xml - 2 MB (works fine)
  2. lookup.xml - 13 MB (Not working)
  </code></pre>
  
  <p>Is it because of a large file or some string breaking??</p>