Re:PHP 8.5 alpha 1 is available for download
by kriz9 on Wednesday July 09, 2025 @08:27AM
(#44509203)
I feel like if you treat temporary variables as documentation they feel less icky. All these examples with the pipeline operator cause way more mental overhead than reading temporary variable names.
[ Parent
| on HN ]
I think it really depends on what operations you are applying. Having one succinct named variable like $slug with a few simple pipeline calls like in the example is "self-documenting" and easy to read. However, some lambdas and non-standard function are definitely a place for nicely named temporary variables in my opinion.