PHPackages                             mead-steve/spl-fix - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mead-steve/spl-fix

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

mead-steve/spl-fix
==================

The spl has some really cool features but some odd naming conventions and some real GOTCHAs. This library is intended to make the spl code easier to use

v0.2.0(12y ago)515MITPHPPHP &gt;=5.3.0

Since Feb 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/meadsteve/spl-fix)[ Packagist](https://packagist.org/packages/mead-steve/spl-fix)[ RSS](/packages/mead-steve-spl-fix/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

spl-fix
=======

[](#spl-fix)

[![Build Status](https://camo.githubusercontent.com/e92a60782272cf5d5ca4871878b40088b5dec8dc242c5b2087a2f64df2a53d3d/68747470733a2f2f7472617669732d63692e6f72672f6d65616473746576652f73706c2d6669782e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/meadsteve/spl-fix)[![Latest Stable Version](https://camo.githubusercontent.com/5bbd0c0d86ec859724cb17569a5a1782c5a72681923f62654ba8a0ddc525136e/68747470733a2f2f706f7365722e707567782e6f72672f6d6561642d73746576652f73706c2d6669782f762f737461626c652e737667)](https://packagist.org/packages/mead-steve/spl-fix)[![License](https://camo.githubusercontent.com/52cabdbe44f79f0de202f71906de10c132d9fd202c96423bf9870b44f18ba425/68747470733a2f2f706f7365722e707567782e6f72672f6d6561642d73746576652f73706c2d6669782f6c6963656e73652e737667)](https://packagist.org/packages/mead-steve/spl-fix)

The php spl has some really cool feaures but also some bugs/gotchas. This is a library to wrap and hopefully reduce the pain caused by the spl.

Installation
============

[](#installation)

The easiest way to install this library is using composer. In your project's `composer.json` file add:

```
    {
        "require": {
            "mead-steve/spl-fix": "dev-master"
        }
    }
```

Then run `composer update`.

Fixes
=====

[](#fixes)

LimitIterator
-------------

[](#limititerator)

The limit iterator is very useful if you want to grab a subset of an iterator. Good right? Pass it to count() however and you'll always get a value of 1. This package provides an updated LimitIterator class that correctly implements countable.

EmptyIterator
-------------

[](#emptyiterator)

Fixed so that passing it to count() returns zero. It's empty after all.

FilterIterator
--------------

[](#filteriterator)

The spl FilterIterator can only be passed an iterator. This is now wrapped so that any traversable can be passed in. This is handled by wrapping the traversable in an IteratorIterator. The following child Iterators have also been wrapped:

- RegexIterator

Additions
=========

[](#additions)

RecursingArrayIterator
----------------------

[](#recursingarrayiterator)

This is a short hand for wrapping an array in a RecursiveIterator then wrapping that in a RecursiveIteratorIterator.

Helpers/IteratorWalker
----------------------

[](#helpersiteratorwalker)

The IteratorWalker allows iterators to be used in the same way arrays are used in array\_walk. So that the two snippets will behave in the same way:

```
    array_walk($array, function($value, $key) {
        echo $key . "=>" . $value;
    });
```

```
    $walker = new IteratorWalker($iterator);
    $walker->walk(function($value, $key) {
        echo $key . "=>" . $value;
    });
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4456d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f6a1fc7be44918da7cc299d340d1e27b338e2396c2f2ca389857b4e2e197c4b?d=identicon)[MeadSteve](/maintainers/MeadSteve)

---

Top Contributors

[![meadsteve](https://avatars.githubusercontent.com/u/1663120?v=4)](https://github.com/meadsteve "meadsteve (11 commits)")

### Embed Badge

![Health badge](/badges/mead-steve-spl-fix/health.svg)

```
[![Health](https://phpackages.com/badges/mead-steve-spl-fix/health.svg)](https://phpackages.com/packages/mead-steve-spl-fix)
```

###  Alternatives

[froiden/laravel-installer

Laravel web installer

10883.9k](/packages/froiden-laravel-installer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
