PHPackages                             denprog/river-flow - 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. denprog/river-flow

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

denprog/river-flow
==================

Functional utilities for PHP 8.5: lazy Pipes, mbstring-aware Strings, and composition Utils with pipe operator support.

v1.0.2(3mo ago)12[7 PRs](https://github.com/denprog5/river-flow/pulls)MITPHPPHP &gt;=8.5CI passing

Since Aug 11Pushed 3mo agoCompare

[ Source](https://github.com/denprog5/river-flow)[ Packagist](https://packagist.org/packages/denprog/river-flow)[ RSS](/packages/denprog-river-flow/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (22)Used By (0)

RiverFlow for PHP 8.5
=====================

[](#riverflow-for-php-85)

[![CI](https://github.com/denprog5/river-flow/actions/workflows/ci.yml/badge.svg)](https://github.com/denprog5/river-flow/actions/workflows/ci.yml)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![PHP](https://camo.githubusercontent.com/f5b551e1c2411c4cbf91c71f870e0aa3037e13787555407d3e89db26199fdf6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352532422d3737376262333f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/f5b551e1c2411c4cbf91c71f870e0aa3037e13787555407d3e89db26199fdf6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352532422d3737376262333f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)

Modern, strictly-typed functional utilities for PHP 8.5: lazy collection pipelines (Pipes), mbstring‑aware string helpers (Strings), and ergonomic composition tools (Utils). Designed for the PHP 8.5 pipe operator `|>` and built with rigorous QA (Pest, PHPStan max, Rector, CS).

---

Highlights
----------

[](#highlights)

- **Pipe operator first**: idiomatic `|>` pipelines, no external wrappers
- **Lazy + eager**: predictable key behavior, memory‑friendly where it matters
- **Iterator safety**: rewinds non-generator iterators, preserves started generator cursors
- **Strong typing**: precise PHPDoc generics, PHPStan at max level
- **Unicode aware**: `Strings` use mbstring when available
- **Ergonomics**: `tap`, `identity`, `compose`, `pipe`
- **Cross‑platform CI**: Linux/macOS/Windows

Requirements
------------

[](#requirements)

- PHP &gt;= 8.5
- Composer 2

Install
-------

[](#install)

```
composer require denprog/river-flow
```

Quickstart
----------

[](#quickstart)

```
