---
title: "Piper: Laravel-Style Array and String Helpers for PHP's Pipe Operator"
url: https://daily.dev/posts/piper-laravel-style-array-and-string-helpers-for-php-s-pipe-operator-iclwpb2a0
source_url: https://laravel-news.com/piper-laravel-style-array-and-string-helpers-for-phps-pipe-operator
type: article
source: "Laravel News"
published: 2026-05-21T13:03:36.720Z
updated: 2026-08-24T06:54:50.673Z
tags: ["php", "laravel", "functional-programming"]
reading_time: 3
upvotes: 36
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Piper: Laravel-Style Array and String Helpers for PHP's Pipe Operator

**[Laravel News](https://daily.dev/sources/ln)** · 3 min read · 36 upvotes · 1 comments

## Summary

Piper is a Spatie package that brings Laravel-style array and string helpers to PHP 8.5's new pipe operator (`|>`). Unlike Laravel's `Collection` and `Stringable` wrappers, Piper's functions operate directly on native arrays and strings using curried functions designed to sit on the right side of a pipe. The `Arr` namespace provides helpers like `filter`, `map`, `values`, and `join`, while the `Str` namespace covers `lower`, `upper`, `replace`, `prefix`, and more. Because all functions pass native values, array and string steps can be freely mixed in a single pipeline. Install via `composer require spatie/piper` (PHP 8.5 required).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/piper-laravel-style-array-and-string-helpers-for-phps-pipe-operator>

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel), [#functional-programming](https://daily.dev/tags/functional-programming)

[View this post on daily.dev](https://daily.dev/posts/piper-laravel-style-array-and-string-helpers-for-php-s-pipe-operator-iclwpb2a0)
