Sönke Ruempler

Cloud Architect and Software Engineer

Home Contact
2008-08-09

PHP: SortingIterator

I just had the need for an Iterator that can sort itself by a user defined callback.

My special use case is that the DirectoryIterator of PHP does not sort the file list so it’s pretty random. But my program logic relies on files being sorted by filename.

Read More

Like what you read?

You can hire me or make a donation via PayPal!

Share
« __('prev')1…345

Archives

  • 2025
  • 2024
  • 2023
  • 2022
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012
  • 2010
  • 2008

Recent Posts

  • From Big Ball of Mud to Modulith Part 2: Introducing Ports and Adapters architecture
  • From Big Ball of Mud to Modulith: Introducing and keeping a clean architecture in PHP with Deptrac
  • Solutions to the Lost Update Problem
  • Understanding the React Function as Children Pattern
  • Review-Driven Testing: Enhancing Code Quality, Upskilling Developers, and Promoting Testing Culture
© 2025 Soenke Ruempler | mastodon
Powered by Hexo
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
Home Contact