PHP variables and array size limits

Source: Internet
Author: User

Preface: SHOPNC with limit 1000 when stitching SQL by default

Then the problem is, if you're using a system-encapsulated approach, but if you don't take->limit (false), you're screwed.

Then the question came, in the judgment time, the database has more than 1900 data, printed on the page only 1000, I thought it is var_dump can not fully display

Echo ' <pre> ';
Var_export ($number);

Echo ' </pre> ';

So I'm going to show that with the sizeof function found only 1000, I initially thought it was more than the size of the array storage array, the result is that the above mentioned problem

So the question is, what is the maximum number of PHP variable arrays to store?

Is the limit size of the Memory_limit

$number Range (1,20000000); // Var_dump ($number); Echo ' <pre> '; Var_export ($number); Echo ' </pre> ';

Run, you find the above error, bar 134217728 divided by 1024 divided by 1024 is 128, if you currently run the code needs more than 128M variables to handle, modify the size of the memory_limit, do not forget to restart

PHP variables and array size limits

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.