php-file-iterator is a small library that walks directory trees and yields files matching include/exclude rules, commonly used to discover test files. It supports filtering by suffixes or prefixes (for example, “Test.php”) to keep selection deterministic. Exclusion lists help you skip vendor directories, VCS folders, or generated artifacts that would otherwise slow down tools. The iterator interface means results are streamed rather than loaded at once, which keeps memory usage modest on large codebases. It also plays nicely with glob patterns and SPL iterators, so you can combine it with other filesystem utilities. As part of the PHPUnit tooling suite, it’s optimized for speed and predictable behavior across platforms.

Features

  • Recursive file discovery with prefix and suffix filters
  • Exclude lists for vendor, VCS, cache, or build directories
  • Lazy iteration to keep memory usage low on big projects
  • Simple API that composes with SPL and glob utilities
  • Cross-platform path handling for consistent results
  • Battle-tested in PHPUnit workflows for test file discovery

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

BSD License

Follow php-file-iterator

php-file-iterator Web Site

Other Useful Business Software
MicroStation by Bentley Systems is the trusted computer-aided design (CAD) software built specifically for infrastructure design. Icon
MicroStation by Bentley Systems is the trusted computer-aided design (CAD) software built specifically for infrastructure design.

Microstation enables architects, engineers, and designers to create precise 2D and 3D drawings that bring complex projects to life.

MicroStation is the only computer-aided design software for infrastructure design, helping architects and engineers like you bring their vision to life, present their designs to their clients, and deliver their projects to the community.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of php-file-iterator!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2025-10-22