Hi, 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.
Looking at a snippet from my code which is used to deal with email attachments:
var_dump($data);
if (array_key_exists('filename', $params) || array_key_exists('name', $params)) {
var_dump($data);
...
}
The first var_dump gives the desired output of the file:
"string(283155) "
--Apple-Mail-5-930065543 ... etc
while the second gives an output of:
string(0) ""
...
string(0) ""
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)
If so, any workaround?
Thanks!
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