Skip to Content
Back-end Performance
book

Back-end Performance

by Bruno Skvorc, Christopher Pitt, Tonino Jankov, Reza Lavaryan, Daniel Berman
August 2018
Intermediate to advanced content levelIntermediate to advanced
141 pages
2h 23m
English
SitePoint
Content preview from Back-end Performance

Chapter 2: How to Read Big Files with PHP (Without Killing Your Server)

by Chris Pitt

It’s not often that we, as PHP developers, need to worry about memory management. The PHP engine does a stellar job of cleaning up after us, and the web server model of short-lived execution contexts means even the sloppiest code has no long-lasting effects.

There are rare times when we may need to step outside of this comfortable boundary — like when we're trying to run Composer for a large project on the smallest VPS we can create, or when we need to read large files on an equally small server.

It’s the latter problem we'll look at in this tutorial.

The code for this tutorial can be found on GitHub.

Measuring Success

The only way to be sure we’re making ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Front-end Performance

Front-end Performance

Bruno Skvorc, Craig Buckler, Maria Antonietta Perna, Ivan Curic

Publisher Resources

ISBN: 9781492069362Errata Page