According to my xdebug output, is_array() leaks the amount of memory that gets passed to it as an argument. If I pass it a large array, it leaks a ton of memory just in order to check if it's an array.
Is there a workaround for this?
17.4313 21858520 +70004 -> is_array() [...]/app/app_model.php:526
Here's the code snippet that causes the leak:
$ret = $this->behaviors[$b[$i]]->afterFind($this, $results, true);
if (is_array($ret)) {
$results = $ret;
}
I'm running this on Linux (Ubuntu 9.04)
PHP: 5.3.2
xdebug: 2.0.5
uname -a gives me this:
Linux linux8 2.6.28-19-server #64-Ubuntu SMP Wed Aug 18 21:57:33 UTC 2010 i686 GNU/Linux
insertPHPJoke()
– meder omuraliev Sep 8 '10 at 14:58xdebug.collect_params
enabled, and what happens if you disable it? – Wrikken Sep 8 '10 at 15:55