Why does is_array() leak memory in PHP?

GreasyTony

New Member
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?\[code\] 17.4313 21858520 +70004 -> is_array() [...]/app/app_model.php:526\[/code\]Here's the code snippet that causes the leak:\[code\] $ret = $this->behaviors[$b[$i]]->afterFind($this, $results, true); if (is_array($ret)) { $results = $ret; }\[/code\]I'm running this on Linux (Ubuntu 9.04)PHP: 5.3.2xdebug: 2.0.5uname -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
 
Back
Top