I've written SO many string transformations full of temp variables and fn() wrappers. PHP 8.6's partial function application plus the pipe operator gets rid of both.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/

I've written SO many string transformations full of temp variables and fn() wrappers. PHP 8.6's partial function application plus the pipe operator gets rid of both.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
PHP 8.6 lands on November 19th, 2026, but you don't have to wait. I recorded my walkthrough on beta 3 with the official Docker image (php:8.6.0beta3-cli), so test your app now.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
My PHP 8.6 video covers the features I think will make my personal life better. Which one should I have covered instead?
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
Partial function application is a fancy computer science term for setting up a function with some of its parameters now and passing the rest later. PHP 8.6 makes it native syntax.
#PHP #PHP86 #FunctionalProgramming
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
Two new symbols to learn in PHP 8.6: ? is the argument placeholder, and ... means zero or more parameters. Define the function up front and fill in the rest later.
#PHP #PHP86 #FunctionalProgramming
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
Pair the PHP 8.5 pipe operator with PHP 8.6 partial function application and you get some VERY concise code (and I expect Rector to help convert the old stuff).
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
I've handwritten min/max range checks for the current page number more times than I can count. PHP 8.6 adds clamp(), and I might polyfill it in older projects.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
PHP 8.6's clamp() has a built-in range check, so you can't mix up the min and max values. I've done that more than once, so I'm VERY happy about this one.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
array_multisort() takes SORT_ASC/SORT_DESC as ints, so 42 gets right through. PHP 8.6 adds a SortDirection enum in the global namespace, and the RFC hints at wider adoption.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
In PHP 8.4, fulfilling an interface property meant redefining the whole property hook. PHP 8.6 lets a readonly property do it and keeps the class much tighter. Big win for value objects.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
When people say PHP isn't secure, I point them to how every release improves security a little bit. PHP 8.6 makes sessions secure by default (check your SSO and payment callbacks before upgrading).
https://www.phparch.com/2026/09/stop-writing-php-like-this-8
PHP 8.6 adds a time duration class with helpers for math. It got a quick mention in my video, and I think it'll make a lot of our code easier to read.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
#[\Override] landed for methods in PHP 8.3, and PHP 8.6 extends it to class constants. Rename the parent's constant, and PHP throws an error.
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
PHP 8.6 deprecates is_integer(), is_long(), is_double(), and doubleval(). I grepped my app and found about 150 of them, which was a fun surprise. What's your count?
https://www.phparch.com/2026/09/stop-writing-php-like-this-8-6-fixes-it/
๐ #PHP 8.6 ships November 19, 2026. Beta now, feature freeze September 22, RC1 September 24 #php86 #webdev #opensource ๐งต๐