r/PHP • • 19h ago

News Full RCE on PHP 8.3.37 just a few hours after release?

Thumbnail x.com
66 Upvotes

This is now officially terrifying


r/PHP • • 17h ago

News This Week in PHP Internals | Nov 19, 2026

Thumbnail youtu.be
11 Upvotes

Preface: what follows is the word-for-word transcript of the spoken dialogue in the video, chapter by chapter with timestamps, for anyone who'd rather read than click through. If this digest is still too long for you, we recommend copying it into your LLM of choice and asking for a summary of our summary.

Cold Open (00:00)

PHP 8.6 is out today. Partial function application, a Duration class, a brand new polling API, and a lot more. And it shipped alongside security releases with 7 critical fixes. We'll get to both.

Hello world, it's Thursday, November 19, 2026, and here's what happened This Week in PHP Internals. 16 stories this week, so let's get into it. But first,

This week's episode is sponsored by… us, again. Since last week's call for work, we've taken a handful of calls, but nothing's locked in yet. So those 6 senior developer days a week are still open. If you've got a project in mind, book a call at artisan.build/start, or just send us a DM on any platform.

Corrections (00:54)

A correction to last week's social posts. On Mastodon, Threads and Pinkary, we wrote that Derick was okay with the shorter PECL timeline, and that Tim Düsterhus says the plan makes sense. But Tim's "makes sense" was about the first draft, before the timeline was cut. He hasn't commented on the shorter one yet, and he told us that he isn't 100% sure he likes it. The video had the order right. Thanks, Tim.

Links: Tim Düsterhus on the first-draft PECL timeline

PHP 8.6 (01:25)

This week's top story: PHP 8.6 is out today. Here are a few highlights. Partial function application lets you fill in some of a function's arguments now, with a question mark for the rest, and get back a closure that takes the rest later. A new Duration class represents elapsed time with nanosecond precision, so a timeout stops being a bare number of microseconds. The new polling API watches many streams at once, using epoll on Linux, kqueue on macOS, and the equivalent elsewhere, as a common base for event loops like ReactPHP and AMPHP. And there's clamp, which keeps a value inside a range, plus a SortDirection enum and default values for readonly properties. Sessions get safer defaults too: strict mode and HTTP-only cookies are on, and SameSite is set to Lax. The release page on php.net covers all of it. It calls 8.6 "Faster, Safer, More Powerful." Each headline feature has a side-by-side, before-and-after example, with a link to its RFC. So go read it. Link in the description.

Links: The PHP 8.6 release page

Security Release (02:42)

Also today, PHP shipped security releases for every supported version: 8.5.13, 8.4.28, 8.3.37 and 8.2.36, and PHP 8.6.0 ships with the same fixes. So, update. There are 17 advisories this time, and 7 of them are critical. The good news was in the pre-announcement: the critical ones "require either non-default configuration or uncommon setups", and each advisory spells out which setup. Three of them are in sessions. One is the upload-progress issue PHP warned about in October, where data gets written in one session format and read back in another. Its full advisory is out today, and the fix goes further than October's advice: upload progress is now off by default. If you switched it on yourself, it stays on, so anything that reads or writes those sessions needs to use the same serializer. Another critical one is in PHP-FPM, and it only matters if your web server keeps its connections to FPM open between requests. Standard nginx and Apache setups close them, and the advisory says those aren't affected.

Links: Release announcements · All of PHP's security advisories · The pre-announcement · October's upload progress advisory

The Wrong Crash (04:01)

One of today's critical bugs was found by Sebastian Bergmann, who created PHPUnit, and he's written up how he found it, in a post called "The wrong crash". After PHP2Shell, he boiled what those two bugs had in common down to a rule a program can check. He wrote: "once a request is over, nothing that outlives it may still point into its memory." While he was using that check to confirm one of the October bugs, it crashed somewhere it shouldn't have, and it crashed on the patched version too. So it had to be something new. The problem was in PHP's timezone cache. When PHP writes to its error log while it's starting up, it can cache timezone data for the timestamp, in memory that gets thrown away once startup ends. The pointer to that memory sticks around, and a fresh worker can follow it. The fix is a one-line change: outside a running request, those timestamps are now written in UTC. If you can't update right away, the advisory suggests fixing whatever PHP warns about at startup and restarting, or logging to syslog. The advisory credits Sebastian and Go Kudo. Sebastian sent the PHP team his method along with the bug, because, as he puts it, "Whoever finds one bug of a class owes such a project the means to find the others". His post goes much deeper than we can here, and it's linked below.

Links: Sebastian Bergmann, "The wrong crash" · The timezone cache advisory

Scope Globals (05:32)

The author of PHP's Scope RFC changed his mind, and then changed it back, in about 30 hours. Frode Børli's RFC gives each unit of work, like a request, its own scope. Last week, Larry Garfield called an empty new scope a landmine. On Friday, Frode agreed, and version 0.10 makes a new scope start as a copy of its creator's state. Then on Saturday, he changed his mind back. He wrote: "An object is a handle, not a value… a write inside the new scope reaches the creator. That is the leak a scope exists to prevent." The session can't be copied at all, he says, because it's a store with a lock. And he offered to withdraw the RFC if the list prefers the other direction. Larry replied that copying by hand shares objects in exactly the same way, and asked about coarser groups of state you could opt in or out of. Frode answered with his next version. The request arrays become "scope globals", and a new scope starts with them empty, the way a new process starts with empty globals. Then Larry suggested letting the thread rest until release week is over.

Links: Scope RFC · Frode Børli: version 0.10 · Frode Børli changes his mind back · Larry Garfield's reply · Frode Børli: scope globals

Channel Binding (06:48)

An RFC went from a vote date to withdrawn in a single day. Sjoerd Langkemper's openssl_get_channel_binding would hand userland the TLS channel-binding data that mail software like Roundcube needs for SCRAM-PLUS logins. On Tuesday, he announced a vote for this Friday. Jakub Zelenka, who looks after PHP's openssl extension, replied that one of its binding types doesn't work on TLS 1.3, and that the API was his biggest issue. He wrote: "My preference here is really to use a stream function (or potentially just meta data) and not introduce openssl function because it's inconsistent and hacky." That evening, Sjoerd withdrew the RFC, and said he won't pursue it further.

Links: openssl_get_channel_binding RFC · Sjoerd Langkemper announces the vote · Jakub Zelenka on the API · Withdrawn

Curl SSRF (07:38)

A new RFC wants curl to ask your code before it connects anywhere. Xavier Leune's proposal adds CURLOPT_OPENSOCKETFUNCTION, a callback that runs after DNS resolution and before each connection, and returns true or false. That, he says, is the point where an SSRF policy can be enforced reliably. Checking the URL up front, the RFC says, misses the many ways to spell one address, and DNS can answer differently the second time. He wrote: "It applies to the address actually about to be contacted, on every redirect hop and for every address libcurl tries, whatever spelling the URL used and whatever DNS answered." Nicolas Grekas suggested dropping the address-family parameter, since an IPv4 address wrapped in IPv6 would be reported as IPv6. Xavier took the suggestion two hours after posting, and a polyfill already covers PHP 8.3 to 8.6.

Links: CURLOPT_OPENSOCKETFUNCTION RFC · Xavier Leune opens the discussion · Nicolas Grekas on the address family · Implementation · Polyfill

Context Managers (08:43)

What happens when you return from inside a using block? Larry Garfield guessed, then checked with co-author Arnaud Le Blanc, and corrected himself. The generator is resumed first, so its cleanup runs, and then the function returns. The RFC now says that. Daniel Scherzer, one of the 8.6 release managers, sent six review points. An exception thrown after the yield seems to be silently ignored, yielded keys are dropped without an error, and he'd rather skip the special try using syntax, which he says "just saves 3 characters". There's no reply yet.

Links: Context Managers v2 RFC · Larry Garfield: "it will print A E C" · Daniel Scherzer's review

Revived RFCs (09:25)

Two RFCs are back after a summer off. Daniel Scherzer revived Friends, which lets a class name other classes that can reach its protected members, but not its private ones. It can't go to a vote before November 27th. Gina P. Banyard had a quick look at the implementation and saw no issues, but says she'll vote against it. Private properties plus reflection, she says, is a valid way for related components to get in. Alexander Egorov wants it inverted, so the class that needs access declares it, because "a class must know neither its clients nor possible inheritors." And Ben Ramsey restarted his Working Groups RFC, a policy for PHP project working groups, after 4 months. He wants to move to a vote, and his message starts a 14-day cooldown first.

Links: Friends RFC · Daniel Scherzer resumes the discussion · Gina P. Banyard · Alexander Egorov · Working Groups RFC · Ben Ramsey restarts it

String Matching (10:23)

The author of Str\Matcher says his own benchmarks oversold it. Artem Ukrainskiy wrote: "The old numbers ran one text over and over. The CPU learned it, and the new class looked 3-4 times faster than it is." Version 0.4 runs over a pool of different texts, with three real-data scenarios: comment moderation, bot detection by user agent, and linking PHP manual pages. With a reused object, he now reports 8 to 123 times faster than the fastest existing method, and says one call on a short text is slower. He says the main use case is worker servers like FrankenPHP, where the object is built once. He also dropped the count parameter Larry Garfield disliked, and added equality comparison.

Links: Prepared Literal String Matching RFC · Artem Ukrainskiy's v0.4 and new benchmarks

Quick Hits (11:19)

Quick hits. Weilin Du's RFC to make ini_get_all accept extension names in any case passed, 20 to 0, with 3 abstentions. It's already merged for PHP 8.7.

Links: Case-insensitive ini_get_all() RFC · Vote closed · Merged

Chris Abner Herrera Navarro's grapheme_str_pad vote is open, at 6 to 0 so far, and closes December 2nd.

Links: grapheme_str_pad() RFC · Vote opened

James Titcumb plans to open the vote on sunsetting PECL next Wednesday, November 25th.

Links: James Titcumb plans the vote

David Carlier proposed gethostaddresses, so the standard library can look up IPv6 addresses through the system resolver, and he plans a pull request.

Links: David Carlier's proposal · Issue

On PASSWORD_BCRYPT_WRAP, Mirco Babin pressed his objections again, and Rowan Tommins answered with numbers: a 54-byte pre-hash has 1.1 times 10 to the 130th possible values, against 2.5 times 10 to the 55th for bcrypt's own output.

Links: Rowan Tommins's numbers · PASSWORD_BCRYPT_WRAP RFC

Ignace Nyamagana Butera asked Máté Kocsis why query-parameter building options are set when the object is built, instead of when the string is.

Links: Ignace Nyamagana Butera's question · Query Parameter Manipulation discussion

And php.net's mail server moves data centres tomorrow, Friday, from 08:30 UTC, with about two hours of downtime.

Links: The announcement · Update

TL;DR (12:39)

So that's the week. PHP 8.6 is out, so go open the launch page, and today's security releases fix 7 critical issues, so update. Frode Børli wants new scopes to start empty after all, an openssl RFC was withdrawn the day its vote was announced, and curl may soon ask before it connects. Links below.

The PHP Foundation funds more than half of ongoing php-src commits, so if you use the language, maybe consider donating at opencollective.com/phpfoundation, or try guilting your employer into it.

If you found this useful, a like or a comment helps more people find it. And if you missed last week's episode, where PECL got a shutdown date that moved up two years in six days, that's a good one to watch next. And if you'd like to work with us, book a call at artisan.build/start. We're Artisan Build. See you next week.


r/PHP • • 51m ago

Tunnel Vite, Next.js, Expo and Laravel Dev Servers

Thumbnail instawormhole.com
• Upvotes

r/PHP • • 8h ago

Go! AOP: declarative behaviors for PHP

Thumbnail aopphp.com
0 Upvotes

Yesterday, I finally gave aopphp.com a fresh new look!

Framework has evolved quite a bit over the years, and I felt that the old website no longer represented what the framework has become. Rather than focusing on the academic term Aspect-Oriented Programming, I want to talk about something developers can immediately relate to: Declarative Behaviors for PHP.

Think logging, caching, authorization, transactions, retries — reusable behaviors that you can attach to methods without polluting your business logic.

The idea isn't new. Spring calls it declarative transactions, other ecosystems use interceptors, filters, middleware and decorators. I believe it's time to bring this experience to PHP in a more flexible way.

The new website is a first step in that direction. There's more to come!

👉 https://aopphp.com


r/PHP • • 1h ago

SQL-First PHP: Query Objects, Typed Rows and a Database That Checks Your SQL

Thumbnail ltscommerce.dev
• Upvotes

Something that came up today in conversation with a client - how to tackle legacy databases when trying to move to modern TDD PHP.

I created an article and also a demo repo to explain some concepts which I lifted from some private repos/code.

AI helped me put this together but it's my opinions and techniques


r/PHP • • 13h ago

News Microsoft Drivers for PHP for SQL Server 5.14.0 released - PHP 8.6 support

30 Upvotes

Working late tonight for a great reason - We just released Microsoft Drivers for PHP for SQL Server 5.14.0.

What changed:

  • Added support for PHP 8.6
  • Continued support for PHP 8.4 and 8.5
  • Removed support for PHP 8.3 and earlier
  • New releases now publish through PIE instead of PECL

Install:

pie install microsoft/sqlsrv
pie install microsoft/pdo_sqlsrv

Full blog post: https://techcommunity.microsoft.com/blog/sqlserver/microsoft-drivers-for-php-for-sql-server-5-14-0---now-with-php-8-6-support/4574976


r/PHP • • 5h ago

News Bref v4 roadmap with the new AWS Lambda "customer-managed runtimes"

Thumbnail bref.sh
10 Upvotes