What's the maximum number of keys for an array in php

后端 未结 10 1607
一整个雨季
一整个雨季 2021-02-08 03:32

I\'m writing a php script where I call

$lines = file(\'base_list.txt\');

to break a file up into an array. The file has over 100,000 lines in

10条回答
  •  不思量自难忘°
    2021-02-08 04:18

    PHP's print_r function does have limitations. However, even though you don't "see" the entire array printed, it is all there. I've struggled with this same issue when printing large data objects.

    It makes debugging difficult, if you must see the entire array you could create a loop to print every line.

    foreach ($FileLines as $Line) echo $Line;
    

    That should let you see all the lines without limitation.

提交回复
热议问题