Dinesh Uprety
@dineshuprety ·
Public
PHP 8.5 Pipe Operator
PHPPass a value through multiple functions without temporary variables or nested calls.
PHP
CodeSnap // free canvas
PHP 8.5 Pipe Operator
<?php
$title = ' PHP 8.5 Released ';
$slug = $title
|> trim(...)
|> (fn ($value) => str_replace(' ', '-', $value))
|> strtolower(...);