Jump to content

array limit?


ok

Recommended Posts

I've never thought about this as never had the need of very big arrays. However, what I can think that limits the array is the actual memory_limit (default should be 16M) configuration option. You can increase that in php.ini. Even though, I guess your application isn't designed well if it needs several MB of memory just for arrays. There are databases for this.

Link to comment
https://forums.phpfreaks.com/topic/120015-array-limit/#findComment-618249
Share on other sites

Hi, have a look at the messages on the 15/8 as I asked the same question. So what I found was it is limited by memory, think PHP gets 128Mb as default, but can change in php.ini.

 

In my code I did some tests by calling memory_get_usage() and memory_get_peak_usage() during the code running (as debug type statements). Yes mem usage went up during array build outs (never over 2.5Mb though but this depends on array site - my array was about 2511 and 9 columns wide of about 40 chars).

 

Doing an unset of the array freed loads of memory so probably good to do that !

Link to comment
https://forums.phpfreaks.com/topic/120015-array-limit/#findComment-619419
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.