PHP 8.5 Released! 🎉 In this new release, we have: – URI Extension – Pipe Operator – Clone With – A new #[\NoDiscard] attribute – Closures and first-class callables in constant expressions – Persistent cURL share handles Read all about it: https://lnkd.in/eiW3cFk9
Wasn’t this language supposed to be dead and dying? 😂😂😂
How do I get it in my xammp
The pipe operator will be a life-saver, but the syntax isn’t very PHP-like. I wish it could have looked more like this $result = $data ->> trim() ->> explode(" ", $)
Nice features! array_first, array_last and #[\NoDiscord] are super handy. The pipe operator is becoming a "must" for chaining long sequences and debug them. Love this!
PHP 8.5 is not just a ‘feature-packed’ update — it’s a real language refinement. The new URI extension finally brings full RFC-3986 compliant parsing, the pipe operator introduces a clean FP-style workflow, ‘clone with’ brings modern immutability patterns, and #[\NoDiscard] gives PHP much-needed API safety. Closures in constant expressions and persistent cURL share handles also make this release one of the most technically mature versions of PHP.”
So many companies moving away from PHP but don’t realize the 💩 comes from their code and not the language
The new Pipe Operator simplifies chaining expressions, while Clone With enables immutable copies; integrating them should cut boilerplate and boost code clarity.
Excited for the pipe operator. I can see some use cases where readability would improve even if it adds no new direct features to the language.
As nice as these are, how about focusing on some things that will really help us write better code: 1️⃣ Type hints for all variables and constants at all scopes. 2️⃣ Callable hinting based on prototypes. Anonymous functions are already rolled into Closure instances, this could be built upon, e.g. SignaturedClosure which in turn is automatically derived based on the original anonymous function signature. 3️⃣ Generics. Yes there are subtleties but even the most basic templated types would be useful.