All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

PHP 8.5 Introduces the Pipe Operator for Simplified Function Calls

By

lemper

10mo ago· 8 min readenNews

Summary

PHP 8.5 introduces the pipe operator (|>), a feature that simplifies passing values as arguments to functions. While seemingly simple, its potential impact on code readability and efficiency is significant. The article discusses its functionality, use cases, and the broader context of PHP's development under the PHP Foundation.

Key quotes

· 3 pulled
The pipe operator, spelled |>, is deceptively simple. It takes the value on its left side and passes it as the single argument to a function (or in PHP's case, callable) on its right side.
On its own, that is not all that interesting. Where it becomes interesting is in chaining operations and improving code readability.
PHP 8.5, due out November of this year, will bring with it another long-sought-after feature: the pipe operator (|>).
Snippet from the RSS feed
The PHP Foundation — Supporting, Advancing, and Developing the PHP Language

You might also wanna read