O'Reilly logo

Pro PHP: Patterns, Frameworks, Testing and More by Kevin McArthur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 11SPL File andDirectory Handling

The SPL provides several classes and iterators that allow for object-oriented access of files and directories. In this chapter, you will learn about how the traditional file-access functions of PHP have been transitioned to object form.

Iteration plays an important role in working with files and folders. In this chapter, you will be introduced to several advanced iteration techniques for listing, searching, and filtering files and directories.

Finally, the SPL provides the ability to manipulate the content of files. It allows you to parse INI files, search using regular expressions, read comma-separated value (CSV) data, and so on. This chapter provides comprehensive examples of how to manipulate files ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required