Re: Need routine to tell me number of dimensions in array.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Lind wrote:
This is one example where references actually decrease memory usage.
The main reason is the recursive nature of the function. Try

BTW, it's not the recursive nature of the function causing the problem. It's the movement of the internal pointer within the array. When it moves the COW realizes the copy's pointer has moved and splits off the copy. You can verify this by echoing the memory usage when you first enter carray(). The spike occurs inside the foreach loop.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux