Are there any limits on storage in a php array?

A sample data containing numbers. Tens, hundreds of thousands - I don't even know.
All the value I have passed in 1 variable.
Do print the variable, the browser begins to display all the values (see the screenshot), horizontal scrolling.. approximately in the middle of the scroll the numbers over and then over, and the line is empty.. like some values should be, but nothing..

Trying to drive the string into an array using explode - deduce then count(array) - nothing displays.

I do not understand why so ... with the limits never experienced.. it's the browser problem? server? php?
How to find out the cause and fix?

7284ed47dce940f18ca908ba3276c1c3.jpg
July 9th 19 at 12:47
5 answers
July 9th 19 at 12:49
Solution
Try anyway - when you create N elements then write to another variable, then the first will see the number of records entered, the second will be a clear limit to 1 row(to learn how much you can cram), I think the timing of execution, or memory per process is small, usually fatal crashes, but there is XS, perhaps the failure of some, in addition - I think not everywhere will be equally be performed from the settings depends.
pastebin.ru/EljGXiJv on line 2 I get the variable that lists numbers separated by a comma is checked, saved it in a file.
that's it, 4 string not already displayed. prevents line number 3. how can it not bother you know? :( - christina commented on July 9th 19 at 12:52
here are the contents of AC after the 2nd friends2x line https://yadi.sk/i/B-OVgszqrqzR3 - christina commented on July 9th 19 at 12:55
: try to add ini_set('memory_limit', '1024M'); in the beginning of the script, perhaps stupidly memory is not enough, I think the gig will be accurate enough ), although it will be clear in memory, whether it - lily.Kozey commented on July 9th 19 at 12:58
: bingo!!!!!! added memory_limit worked! thank you very much!!
and how to understand how much memory consumes the request? is it possible to somehow throw an error if you exceed memory? - christina commented on July 9th 19 at 13:01
memory_get_peak_usage() - lily.Kozey commented on July 9th 19 at 13:04
July 9th 19 at 12:51
Bet on a glitch of the browser.
July 9th 19 at 12:53
Try file throw the output of the array)
Or at least <br> join the numbers. - christina commented on July 9th 19 at 12:56
made code like this: pastebin.ru/THdu6FvI
file is written 4.3 mb
but the last 5 line of code was not satisfied!
even if I don't display in a browser this long string, then it's still 5 line of code was not satisfied!

how to understand why?? - christina commented on July 9th 19 at 12:59
stop! think the reason is explode on a 4 string.. - lily.Kozey commented on July 9th 19 at 13:02
in the string occurs several times 2 commas in a row.. it may interfere with the fulfillment of explode at the comma? - christina commented on July 9th 19 at 13:05
that's a variable that keyways in file https://yadi.sk/i/B-OVgszqrqzR3 explode but then chops off all the work the script.. do not understand.. it also correctly stated explode by comma.. - lily.Kozey commented on July 9th 19 at 13:08
Two commas in a row is not formally prevented, but create empty elements. The string "1,2,3,,4,5" will be divided into "1", "2", "3", "", "4", "5". - Daphne_Roob commented on July 9th 19 at 13:11
July 9th 19 at 12:55
Configuration files from php was not looking? There was a kind described limits
July 9th 19 at 12:57
If you have enabled the display of errors, or would look at the logs PHP, all scaleby clear.
nope, I'm at the beginning of php code written ini_set('display_errors','On');
error_reporting('E_ALL'); but nothing displays potato.. - christina commented on July 9th 19 at 13:00

Find more questions by tags PHP