PHP Losing variable data
Posted
by Conor B
on Stack Overflow
See other posts from Stack Overflow
or by Conor B
Published on 2010-06-03T21:43:32Z
Indexed on
2010/06/03
21:44 UTC
Read the original article
Hit count: 115
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!
© Stack Overflow or respective owner