Php big data can't print out what's going on?

clipboard.png
the database has 200000 pieces of data. Use php to read all of them. If you only read id or name columns, you can print them out by print_r. If you read all columns, you can"t print them, and if you read all the columns, you can"t print them, and the correct information can be printed when you set memory_limit higher. Excuse me, what is the reason for this? is there not enough memory?
in addition, is there a relationship between memory_get_usage and memory_limit?

Apr.14,2021

you want to type it out without changing the memory limit, don't read it all at once and print it in memory. Part of it can be read out and printed. Reading all the data to memory itself is an unreasonable design, because now you are 20w, memory does not burst, but this number is uncontrollable, such a program is not robust.

Menu