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 ...

Get Pro PHP: Patterns, Frameworks, Testing and More now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.