zgkhoo Posted November 13, 2007 Share Posted November 13, 2007 Hi, Here i am putting my question in front to all of you that may be common one for you. My question is that: What is the array limit in PHP ? means How many elements can be stored in an array at a time while using PHP ? Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/ Share on other sites More sharing options...
Psycho Posted November 13, 2007 Share Posted November 13, 2007 I don't know that there is any set limit. But, obviously as the array gets larger and larger performance will suffer. How much performance will suffer based upon how many items would be directly related to the available resources on the server: mostly memory I would suspect and probably CPU as well. Also realize, that the scalability would be directly related to what you put into the array. How big are you needing the array? Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/#findComment-390685 Share on other sites More sharing options...
zgkhoo Posted November 13, 2007 Author Share Posted November 13, 2007 is a pyramid....keep increase....keep expanding.... how then? i cant estimate....cos it depend on how the user input how many data inside Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/#findComment-390709 Share on other sites More sharing options...
rajivgonsalves Posted November 13, 2007 Share Posted November 13, 2007 Well I have stored a lot of data in a array if the array goes too big you get the memory limit reached error or something Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/#findComment-390711 Share on other sites More sharing options...
Psycho Posted November 13, 2007 Share Posted November 13, 2007 is a pyramid....keep increase....keep expanding.... how then? i cant estimate....cos it depend on how the user input how many data inside You don't need to estimate - you need to mandate. Building a piece of software without limitations for an exponentially increasing process is bad practice. You need to set an appropriate limit and enforce it. Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/#findComment-390747 Share on other sites More sharing options...
zgkhoo Posted November 15, 2007 Author Share Posted November 15, 2007 u meant terminate the process if reach the limit? Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/#findComment-391973 Share on other sites More sharing options...
Psycho Posted November 15, 2007 Share Posted November 15, 2007 No, I mean limit the input by the user - no sense starting the proicess if you can't finish. Link to comment https://forums.phpfreaks.com/topic/77130-array-limit-in-php/#findComment-391977 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.