ok Posted August 17, 2008 Share Posted August 17, 2008 I'm wondering if there is a limit for the array? How many characters or bytes it can handle? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/120015-array-limit/ Share on other sites More sharing options...
Fadion Posted August 17, 2008 Share Posted August 17, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/120015-array-limit/#findComment-618249 Share on other sites More sharing options...
niwa3836 Posted August 18, 2008 Share Posted August 18, 2008 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 ! Quote Link to comment https://forums.phpfreaks.com/topic/120015-array-limit/#findComment-619419 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.