title: PHP Losing variable data
body: <p>I'm having an issue with PHP losing data in a variable. There is quite a bit of data in the variable, because it basically contains a binary file, but I'm wondering if this is cause for it to completely lose it's information.</p>
  
  <p>Looking at a snippet from my code which is used to deal with email attachments:  </p>
  
  <pre><code>var_dump($data);  
  if (array_key_exists('filename', $params) || array_key_exists('name', $params)) {  
      var_dump($data);  
   ...
  }
  </code></pre>
  
  <p>The first var_dump gives the desired output of the file:</p>
  
  <pre><code>"string(283155) "
  --Apple-Mail-5-930065543 ... etc
  </code></pre>
  
  <p>while the second gives an output of:</p>
  
  <pre><code>string(0) ""
  ...
  string(0) ""
  </code></pre>
  
  <p>Any idea why this is happening? Does PHP just drop data in variables if they are really large? (I didn't think so, as I've never had this problem before)</p>
  
  <p>If so, any workaround?</p>
  
  <p>Thanks!</p>
  
  <p>Edit: also worth mentioning that there is no code missing between these statements. I also just tried it with a shorter string and I'm getting the correct output for both var_dump calls</p>