Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: one minus one?
(Example: nine)

The Note You're Voting On

renanlazarotto at gmail dot com
4 years ago
Be aware that using file() to count lines can cause OOM on the server as it'll allocate all lines into an array.

If you're dealing with files that can have thousands of lines, SplFileObject might be a better idea and with little changes you can get the same result.

<< Back to user notes page

To Top