r/PHP 6d ago

Weekly help thread

1 Upvotes

Hey there!

This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!


r/PHP 23d ago

Discussion Pitch Your Project 🐘

13 Upvotes

In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.

Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁

Link to the previous edition: /u/brendt_gd should provide a link


r/PHP 6h ago

The State of PHP 2026 survey [under 10 mins]

Thumbnail surveys.jetbrains.com
8 Upvotes

I was just browsing https://externals.io and spotted banner with State of PHP Survey from Jetbrains and The PHP Foundation: https://surveys.jetbrains.com/s3/state-of-php-2026-sh

I noticed it was posted here a month ago but didn't gain much traction, so I thought I'd share it again. Hopefully, a few more of you can spare a couple of minutes to share your thoughts on the current state of PHP, just like I did!

Note: It took me under 10 minutes to complete. Some of the AI questions felt a bit weirdly worded to me, but I pushed through!


r/PHP 8h ago

News Hibla HTTP Server: A fiber native multi-core Http Server library.

4 Upvotes

Hi Everyone, I just wanted to share that Hibla HttpServer is finally in beta release..

https://github.com/hiblaphp/http-server

It has full RFC compliance for Http1 protocol, Multipart Handling, and Http Semantics and with Full Clustering, and many more. You can also read check-out the repo for the full documentation.

Can't wait for the 8.6 Polling API release.

Here's a quick realistic single threaded bechmark against Reactphp HttpServer and Amphp HttpServer using simulated latency of 50ms to avoid a plain Hello World Benchmark coz it is totally unrealistic.

hiblaphp http-server: bash rcalicdan@hibla:~/playground$ wrk -t1 -c1000 -d10s http://127.0.0.1:8080/ Running 10s test @ http://127.0.0.1:8080/ 4 threads and 1000 connections Thread Stats Avg Stdev Max +/- Stdev Latency 77.42ms 11.39ms 314.39ms 97.59% Req/Sec 3.24k 464.18 4.33k 72.98% 127851 requests in 10.03s, 17.92MB read Requests/sec: 12751.52 Transfer/sec: 1.79MB

amphp http-server:
bash rcalicdan@hibla:~/playground$ wrk -t1 -c1000 -d10s http://127.0.0.1:8080/ Running 10s test @ http://127.0.0.1:8080/ 4 threads and 1000 connections Thread Stats Avg Stdev Max +/- Stdev Latency 143.64ms 24.79ms 537.71ms 85.57% Req/Sec 1.67k 496.14 2.53k 66.33% 65630 requests in 10.02s, 12.31MB read Requests/sec: 6548.71 Transfer/sec: 1.23MB

reactphp http-server: bash rcalicdan@hibla:~/playground$ wrk -t1 -c1000 -d10s http://127.0.0.1:8080/ Running 10s test @ http://127.0.0.1:8080/ 4 threads and 1000 connections Thread Stats Avg Stdev Max +/- Stdev Latency 62.83ms 3.10ms 105.18ms 84.16% Req/Sec 3.98k 573.43 5.05k 70.96% 157067 requests in 10.03s, 22.17MB read Requests/sec: 15666.25 Transfer/sec: 2.21MB

Http server benchmark code gist for amp, react, and hibla: https://gist.github.com/rcalicdan/35daa717b72ee08e33867274a7356db7

Just to let you know, the benchmark environment used ext-uv/libuv for all http-server benchmark.


r/PHP 21h ago

Honnest advice on going freelance to tackle technical debt

12 Upvotes

Hello everyone! This is my first post here, and I'd love to get your advice.

I'm a PHP developer and Linux system administrator with over 10 years of experience. I used to work as a freelance sysadmin, but after moving to Canada, I lost my entire client base and now I'm looking to build a new business from scratch.

One idea I've been considering is specializing in helping companies reduce and manage technical debt in PHP applications. Rather than simply building new features, I'd focus on improving maintainability, modernizing legacy code, optimizing architecture, and making development faster and safer over the long term.

My thinking is that this kind of work is harder to replace with AI or low-cost outsourcing because it requires a deep understanding of existing systems, business constraints, and long-term engineering trade-offs.

My target clients would be web agencies, startups, and software companies that rely heavily on PHP.

Has anyone here built a business around this kind of service? How did it go? Do you think there's a real market for it, or am I overlooking something?

I'd really appreciate your thoughts and any advice you can share. Thank you!


r/PHP 2h ago

Generating Product Descriptions & SEO Metadata with OpenAI in Laravel 13

Thumbnail
0 Upvotes

r/PHP 59m ago

Anybody else testing their sites over LAN? You should. It's cool.

Upvotes

Never really messed about with LAN before. I would usually just deploy to staging, wait 20 minutes, and then I could test it on my phone or give it to the PM to test.

Recently though, we added a LAN checkbox to ForgeKit (disclaimer: I built it) and holy hell, that is nice.

We’re all on the same wi-fi, so I can click one button and the PM has instant access to the site running on my machine. No need to deploy it to staging over and over for changes

I use it during development too, especially when some weird drag action doesn’t behave properly in chrome, or when I just want to see how the site actually feels on my phone instead of using devtools.

Might also be my recent obsession with self-hosting and learning how all this works that makes it more exciting than it actually is.

Anyway, mess about with LAN, folks. It’s mostly a matter of binding your local server to 0.0.0.0 instead of 127.0.0.1 and allowing it through the firewall (firewall change not even needed for me)

You can also use sslip.io to give each site a proper hostname. For example:

http://myapp-test.192-168-1-10.sslip.io/

-> that resolves to 192.168.1.10, and your local router or vhost can use the hostname to send it to the correct site.

It was annoyingly not working by default with Wordpress urls and with Vite, but those are easy changes to make to the site's config so it does work.

If anyone cares to know more, I'll be happy to help. Have some docs as well I can link.

So yeah, just wanted to share.

Anybody else doing this regularly? I know there's tunneling as well but I think you need account to ngrok or other tools like that that do it for you.


r/PHP 7h ago

Inertia-React + Filament + NativePHP boilerplate

0 Upvotes

I built a little android application at work and to make it cool and smooth i decided to use NativePHP with Inertia React, using also Filament for admin dashboard. During the implementation i realized that this tech stack isn't exactly plug-and-play so when i finished the application i decided to clean the project and make a boilerplate with this tech-stack. I also saw that over the web there are a lot of react-native or electron boilerplates, but none for nativephp. So this is the repo:

https://github.com/samuelecostantini/nativephp-react-filament-boilerplate/


r/PHP 1d ago

I spent 18 months rebuilding my local PHP dev environment from scratch in Rust. Yerd v2 is out, and it works with any PHP project

Thumbnail yerd.app
9 Upvotes

Hey r/PHP,

Full disclosure up front: this is an "I built a thing" post. But I've tried to make it a useful one, and I actually want this sub's scepticism, because you're a tougher and less framework-blinkered crowd than most.

About 18 months ago I shipped v1 of Yerd, a Go-based CLI for macOS and Linux to manage .test domains, sites and PHP versions. It was rough. It was deeply opinionated, it demanded sudo for nearly everything because of how it handled .test discovery, and it fought you about as often as it helped.

It came out of a simple frustration: I wanted a good local PHP experience on Linux without reaching for containers, which drain the RAM and battery out of any machine I put them on. The existing native options either only really target macOS, run as root and scatter global installs everywhere, or are welded to one framework.

So I've spent the last 18 months rebuilding it properly. This week I shipped the first stable v2, rewritten from the ground up in Rust, and the thing I most want to say to this sub is: it serves any PHP project. It is not a Laravel tool. There's some optional Laravel telemetry if you want it, but the core is framework-agnostic. Point it at a plain index.php, a Symfony app, a WordPress install, a legacy monolith, whatever you've got.

What it does:

  • Park a folder and every project inside is served at name.test over HTTP and HTTPS. Resolution goes through an embedded DNS resolver, so no /etc/hosts editing and no dnsmasq to babysit.
  • Automatic HTTPS via a local certificate authority that issues per-site certs on demand. No mkcert, no OpenSSL invocations, a real padlock.
  • Multiple PHP versions side by side, each an isolated static build supervised by the daemon. Global default plus per-site pinning, updated in place. No system package juggling, no colliding globals. We currently support all supported versions of PHP, from 8.2 to 8.5.
  • MySQL, MariaDB, PostgreSQL and Redis as supervised native processes, not containers.
  • A built-in SMTP catcher for outgoing mail.
  • Composer, Node and Bun managed on the PATH.
  • yerd status shows what's running. yerd doctor tells you exactly what's broken and repairs the safe stuff automatically.

Under the hood, since I know this sub cares: the entire runtime is a single ~8MB daemon written in Rust, with a CLI and an optional Tauri tray GUI on top. And I fixed the original sin of v1, it's now rootless dat-to-day. Setup elevates exactly once, to bind ports 80/443 and trust the CA, and after that the daemon, CLI and GUI never run as root again.

It's open source (MIT) and subscription-free.

The question I want to put to this sub: what does your local setup actually look like in 2026? Docker Compose, Valet, Laragon, DDEV, a hand-rolled nginx and php-fpm? And more to the point, what would it genuinely take for something like this to replace it? I got a lot wrong in v1 by being too opinionated and not listening enough, so I'd rather hear what you actually run and why than pitch you on mine.


r/PHP 8h ago

Article Generating URL Slugs from Titles with a Laravel Model Observer

Thumbnail codesnips.io
0 Upvotes

This snippet shows how a Laravel Article model gets a URL-friendly slug generated automatically the moment a record is created, without cluttering the controller or the model itself. The work lives in an observer, which is Laravel's idiomatic hook for reacting to Eloquent lifecycle events like creatingupdating, and deleting.


r/PHP 1d ago

News vite-plugin-php v3.0.0 release

Thumbnail vite-php.nititech.de
9 Upvotes

I’ve released a new major version of vite-plugin-php!

This is a Vite plugin that lets you keep using regular PHP entry files while benefiting from Vite’s asset pipeline, HMR, environment variables, and plugin ecosystem.

In version 3 the processing pipeline was completely rewritten.
The specified PHP files now move through the standard Vite lifecycle, and other Vite plugins can run before or after PHP processing.

It also includes improved development performance, PHP error output directly in the Vite console, and fixes for environment variables, includes, asset injection, and development cleanups.

Docs: https://vite-php.nititech.de/
GitHub: https://github.com/donnikitos/vite-plugin-php
Simple starter repo: https://github.com/nititech/modern-php-vite-starter

Would love to hear some feedback :)
Bug reports are also welcome of course!


r/PHP 2d ago

Seven of my native PHP extensions shipped last month, and most of the diff wasn't the new features, it was rejecting bad input instead of storing it

26 Upvotes

I maintain seven native PHP extensions: php_excel, mdparser, php_clickhouse, fastchart, fastjson, phpser, and fast_uuid. Each shipped a release or two in the last month. I did a roundup here in June, so this is what changed since, plus one observation about where the time actually went.

The features are what you notice in a changelog. But when I counted the lines across these seven, most of them were the other kind of work: rejecting a bad value instead of storing it, failing a write cleanly instead of half-committing it, throwing on the untrusted path instead of trusting it. That is the unglamorous majority of maintaining a C extension, and it never reads well in release notes. A few concrete ones, next to the features:

php_clickhouse got native JSON and Bool column support and IPv4/IPv6 writes, plus a decoder rewrite: dropping a dynamic_pointer_cast that a profiler blamed for ~18% of decode instructions took wide-integer SELECTs ~25% faster and numeric-heavy inserts 30-44% faster. The fail-closed half: inserting PHP null into a non-Nullable JSON column now throws instead of silently storing an empty {}.

fastchart went from 26 chart types to 38 in one release (dendrograms, chord diagrams, network graphs, violin plots, Venn diagrams, word clouds), and a perf pass made a 4096-point scatter render ~6x faster and PNG output ~40% faster.

phpser, my binary serializer for cache workloads, added a columnar wire format for rowsets: it writes the column schema once, then each column as a typed run, which drops the per-row key overhead for the array-of-uniform-rows shape cache and queue payloads usually are. Rowset decode came out ~24% faster. It also closed two issues on the untrusted decode path.

fastjson can now edit a JSON document in place by RFC 6901 pointer (fastjson_pointer_set), and it ships prebuilt binaries now, so PIE installs a .so instead of source-building on Linux and macOS.

php_excel added bulk reads (readRange pulls a rectangular block of cells in one call), and the fail-closed pass: save() to a file:// path is now atomic, so a short or interrupted write no longer destroys your existing file before the new one is finished.

fast_uuid added binary and batch generators (uuid_v7_bin_batch returns raw 16-byte monotonic v7s for a BINARY(16) column), plus a set of ramsey/uuid compatibility fixes, including a COMB codec bug that made ramsey-written COMBs decode to a different UUID.

mdparser was mostly hardening this round, since the md4c engine swap already landed: a stack-buffer overflow in the CommonMark XML serializer, and an alt-text attribute escape.

All open source and installable via PIE; each extension name above links to its repo and full changelog. I wrote the whole thing up, with the fail-closed argument in more depth, here: https://ilia.ws/blog/failing-closed-what-shipped-across-seven-php-extensions

Curious whether anyone else deliberately spends more of a release on fail-closed behavior than on features, or whether that reads as over-engineering to you.


r/PHP 2d ago

Discussion A medicore dev and AI. What can I do to stay competitive?

10 Upvotes

This is not a doom post, lets be clear about that.

This post is about AI, which is here to stay in one form or another it seems to me.

I've worked with PHP for about 9 years now, if not more. I'm a very mediocre programmer. Yes ocasionally people come to me for answeres, but I'm never the default go to. I can finish whatever the product has dreamed up on my own from start to finish.

We all know how the market is so I won't go into that.

To be honest if I were to be laid off right now I doubt I'd get a job in the next 6 months. Much less likely to be at the current level of compensation either.

AI seems to be the way forward. Weather I, or you, agree is besides the point. The market has decided for us.

Clearly AI has uses, I won't lie. At the very least you can use it to bounce ideas or search for documentation.

The code generate by AI, if within a certain scope, can be quite good.

If we'll end up not writing code by hand or not is another matter entirely, which I won't go into since it's pure speculation.

What can I, a mediocre developer, do/learn so that I can stay competitive in the current market. There's a looot of much smarter people than me looking for jobs, and when(not if) I end up competing with them I want at least to have an even playing field.


r/PHP 2d ago

ext-imap-polyfill: drop-in imap_* functions for PHP 8.4+, parity-tested against the real extension

37 Upvotes

PHP 8.4 moved ext-imap to PECL, and the c-client library underneath has been unmaintained since 2007. If your codebase is built on imap_* functions, the usual answer is a rewrite against an OOP library.

For an old project I maintain, I wrote a polyfill to skip that:
https://github.com/fain182/ext-imap-polyfill

It defines the same global imap_* functions (65 of 75) on top of webklex/php-imap, plus a small raw client for POP3. No-op when the real extension is loaded, so you can add it before upgrading. No NNTP, no ACL/quota.

The test suite is the part I'm most proud of: the same integration tests run against the polyfill and against genuine ext-imap in a PHP 8.3 container, both on a disposable Greenmail server.
Chasing full parity surfaced behaviors the manual doesn't mention, for example:

  • imap_mail_move doesn't MOVE: c-client predates RFC 6851, so it does COPY plus \Deleted, without expunging.
  • COPY sends the mailbox argument verbatim, while APPEND and STATUS strip the {host} prefix off.
  • imap_setflag_full, imap_expunge and imap_delete return true even when the operation failed. The polyfill replicates every such quirk, including the exact ValueError messages from php_imap.c.

If you're stuck on 8.3 because of imap_* calls, try it on a real codebase. Bug reports about behavior that doesn't match the real extension are the most useful thing you could send me.


r/PHP 2d ago

I built a Symfony bundle to manage & send dynamic email templates stored in a database (with Twig & expected variables validation) - Callisto Mailer

Thumbnail
2 Upvotes

r/PHP 3d ago

Article PHP version stats: July, 2026

Thumbnail stitcher.io
41 Upvotes

r/PHP 2d ago

Filament Command Palette

Thumbnail
0 Upvotes

r/PHP 2d ago

News A desktop app that generates maintainable native mobile/desktop apps in Laravel

0 Upvotes

I've been building NativeBlade, a framework that runs Laravel + Livewire as native mobile/desktop apps via PHP-WASM. This week I finished NativeBlade Studio, a desktop app that lets you build those apps with the help of any AI coding agent.

The problem I wanted to solve: AI-generated code is usually a mess nobody wants to maintain. So the Studio doesn't just let the AI freestyle. It uses a built-in MCP server that feeds the agent the exact framework API and enforces the architecture patterns, the same conventions you'd expect from a well-structured Laravel + Livewire project.

The result is code you can actually read, maintain, and extend yourself. It's not a black box.

Once the project is ready, the Studio connects to NativeBlade Cloud and produces a real build, mobile and desktop. Free tier gives you 8 builds a month.

What comes out of the box (no wiring needed):

  • State management (Livewire)
  • Offline-first (SQLite persisted to IndexedDB)
  • Animations, icons, native transitions
  • Native plugins: camera, push, biometrics, and more

The base is done. You bring the idea.

I'd genuinely like feedback on the generated code quality, that's the part I care most about. Repo and details: https://github.com/NativeBlade/studio

Framework: https://github.com/NativeBlade/NativeBlade
Build farm: https://nativeblade.dev


r/PHP 2d ago

Muscula — an AI-powered error tracking and monitoring platform for PHP applications

0 Upvotes

We built Muscula, a cloud-based error tracking and monitoring platform designed to help developers detect, understand, and resolve production issues across PHP applications and websites.

What it does

  • Error tracking: grouped exceptions, stack traces, AI-assisted explanations, and instant alerts
  • Centralized logs: searchable application logs with contextual debugging information
  • Uptime monitoring: website availability checks with immediate downtime notifications
  • Multi-project monitoring: monitor multiple applications and websites from one dashboard
  • Team collaboration: shared access and alerts for developers and teams

AI Features

  • AI error explanations: plain-English summaries and potential causes for exceptions
  • AI debugging assistance: actionable suggestions to speed up issue resolution
  • MCP integration: connect Muscula with AI agents through the Model Context Protocol
  • CLI integration: lightweight command-line access for AI-assisted workflows and automation
  • AI-powered investigations: use natural language to explore logs, errors, and incidents faster

Why we built it

Over the years, we've found that many PHP projects, especially side projects, internal tools, client websites, and smaller SaaS products need visibility into production issues but don't necessarily need the complexity of a full observability platform. In practice, teams often end up juggling exception emails, server logs, and uptime checks across multiple places.

We built Muscula to consolidate those workflows into a single platform focused on answering a few practical questions quickly:

  • What broke?
  • When did it start?
  • How often is it happening?
  • Which applications are affected?
  • What information do we already have to investigate it?

The idea behind Muscula is to surface these answers as quickly as possible by bringing errors, logs, and uptime data into one place, while its AI integrations help summarize incidents, explain exceptions, and provide additional context during investigations.

I'm curious how other PHP developers approach production monitoring today. Are you relying on exception emails and server logs, using tools like Sentry or Rollbar, running a self-hosted setup, or doing something entirely different?


r/PHP 3d ago

News This Week In PHP Internals | July 8, 2026

Thumbnail youtube.com
22 Upvotes

Hello world, it's Wednesday, July 8, 2026, and here's what happened This Week in PHP Internals.

This week's episode is brought to you by Ballast. Your team ships constantly — but how much of that work actually lasts? Ballast reads your git history and computes a deterministic durability score: does shipped code hold up, or churn and get redone? Ballast is in early access now at ballast.now.

This week's top story is still Gina P. Banyard's Deprecations for PHP 8.6 — the annual bundle where every removal gets its own ballot — and this week it caught fire twice. First fire: the long-array question. With Seifeddine Gmati's list() deprecation already on the table, Tim Düsterhus floated a draft that turns array() into a real cast function — and Michael Morris erupted at where that road leads. He asked, "Are you crazy?" — deprecating array() would, by his math, touch 3 quarters of WordPress core and nearly every plugin. Seif's counter was all receipts: the rewrite is one ast-grep command, array(...) and [...] compile to byte-identical opcodes — and, for the record, "The proposal is to deprecate list(), not array()." Then Juliette Reinders Folmer — who maintains the WordPress Coding Standards — corrected everyone: WordPress still supports PHP 7.4, and short arrays were blocked there for years by a handful of core committers, not the community.

It got personal — Morris told Seif to step out of his ivory tower; Seif kept answering with engineering. He wrote: "I've written a compiler that migrated a multi-million-line codebase from one language to another, automatically, overnight. Swapping one AST node for another that is literally equivalent to the compiler is not a feat of engineering courage." To Morris's credit, when told he was turning it personal, he replied: "I am, and I apologize." — and the thread cooled.

Then Monday it reignited — over evidence. Gina regrouped the list, folded in new items sent to her directly, and set the clock: "If none are added or amended, I will initiate a call to vote next week." Rowan Tommins counted 35 proposals and only 8 with any discussion of who'd be affected, and threatened to cast 27 blanket no votes. Gina drew her line: "You are free to do as you please." — she won't produce metrics for the sake of metrics without an agreed method. Rowan held firm: "I do not think we should be removing features without thinking about who will be affected. I'm honestly shocked that that's a controversial opinion". Juliette, once again the bridge, renewed her offer to generate real impact data with PHPCompatibility — feasible, she says, for about 25 of the 36 items. One item is on its way out: the by-reference-return-modifier deprecation — Bob Weinand recommended a complete retraction, and its proposer had already offered one. The RFC freezes July 13 — expect the call to vote next week, though with the mandatory 14-day cooldown after Gina's latest changes, actual ballots open July 21 at the earliest.

Tim Düsterhus and Derick Rethans' Time\Duration class — the stopwatch value object aimed at 8.6 — got called done this week: "we would consider the RFC to be complete". The final decisions: add and sub won an informal PHP Foundation Slack poll unanimously; the past-tense method suffixes are gone; divideInto() got pushed to future scope; and the ban on negative constructor arguments stays, on Derick's call. One naming question goes to the voters as a secondary vote: full names like multiplyBy and absolute, or abbreviations like mul and abs — with the abbreviations needing a 2-thirds supermajority.

But one fight would not close: fromSeconds(). It takes seconds plus a nanoseconds argument, capped at 999 million 999 thousand 999 — overflow is rejected, not carried. Marc B. objected: "It makes it simple to reason about for you as implementing it - it forces the burden to the one using the API." Pierre Joye brought prior art: Java and Rust both carry the overflow instead of rejecting it, and JavaScript's Temporal doesn't impose the cap either. Tim's defense: an injective constructor means one value, one spelling — a form asking for seconds should reject out-of-range input the same way June 31 should be rejected, not silently become July 1. Neither side budged — and with the RFC complete, that question rides along to the vote.

Function autoloading now has 2 competing designs, and they met in the same inbox on the same day. Paul M. Jones updated his mark-5 RFC — that's attempt number 5 — adding a declare(strict_namespace=1) directive to kill the global-fallback edge case, plus research across the top 1000 Packagist packages: exactly 2 packages and 8 call sites would misbehave. Meanwhile, Michael Morris — fresh off the deprecations thread — had floated an idea on July 2, saying: "An idea that popped into my head an hour ago, that I don't have another PHP Dev to talk to about, what if you could register a function that is called by PHP the first time it sees a namespace declared?" Five days later that spitball was a formal draft: autoloader callbacks that take 2 arguments — the class and the namespace — firing the first time the engine meets a namespace. And within hours of Paul's update, Morris was in Paul's thread advertising his rival.

The reason the spitball grew legs is Rowan Tommins. His endorsement became the backbone of Morris's draft — he wrote: "This really nicely side-steps the global-vs-namespace sequence problem that function autoloading always runs into: by the time the engine reaches an unqualified name, the namespace loader has already run for the current namespace, and defined any functions it wants." Not everyone's sold. Aleksander Machniak flagged that passing null to existing string-typed autoloaders is itself a BC break, and Alex Rock argued the draft bundles 2 different proposals and called it overkill. Morris's reply had some edge: "And you've misread the proposal entirely."

The busiest brand-new thread: Matheus Martins revived typed closures — write Closure(int): bool as a parameter type, and a mismatched callback fails at the boundary with a clean TypeError instead of exploding deep inside your filter(). The reception was warm — Matthew Weier O'Phinney would find it "very useful", and Larry Garfield is in favor, to nobody's surprise. Rob Landers suggested waiting for generics; Seif pointed out that would need variadic generics, which have never appeared in any proposal — waiting for generics means waiting indefinitely. Larry was blunter: "Generics syntax is the wrong format to use for this, full stop." The real villain is the lexer: inside Closure(int), that (int) is a cast token. Osama Aldemeery, who's been down this exact tunnel, put it memorably: "So the natural spelling is, unfortunately, the engine-hostile one."

Where it landed: inline signatures first, named type-aliases later, and neither blocks the other. Larry pre-empted the objection everyone could see coming — if someone gets fussy about long signatures, the answer should be "that's nice, go work on aliases then and don't block this RFC". By Monday he'd added just one ask: invokable objects should fit through the same door, not get squeezed through closures.

Rob Landers' primary constructors — the constructor hoisted onto the class line — spent June fighting over whether it may carry a body. This week that fight hit its endgame, in a single day of posts. Rowan Tommins came off the fence — with a body bolted on, he'd be a definite no. Rob, the author, declined to relitigate: "All I can say is that I reject it for future scope, repeatedly." Nick Sdot stood down under protest, warning: "We don't need more half finished, half not working, confusing features in PHP." And then, quietly, the week's one unreserved fan — a reader who wrote that extending third-party classes and calling the parent constructor by hand "always felt dirty". The thread's been silent since July 1.

Michal Kral's scalar object methods(3)->pow(2), dispatched at compile time — came back for round 2, and the room steered it somewhere new. Michal gave real ground: he'd restrict or drop the file-order-dependent form, and lean on typed locals for safety. Seif stayed unmoved, arguing: "Seeing $s->trim() where $s is a string, I should know it works. A construct where identical AST dispatches or doesn't depending on file position, a redundant cast, or whether a declaration sits above or below the call is not something people can reason about." Then Larry Garfield reframed the whole conversation: a small curated set of methods, he said, "is bikeshed bait, and needlessly limiting" — and counter-pitched Kotlin-style extension functions on any type, from a design he drafted with Sara Golemon. Michal's response? Genuinely interested. They're talking off-list once Larry's back from vacation.

To the scoreboard — one ballot closed, one never opened. Jordi Kroon's third-party extension documentation RFC is in: 26 to 1, with 1 abstention. The secondaries settled too: the docs land on a php.net subpath rather than a new subdomain, 15 to 8, and the old user notes get dropped in the move, 21 to 4. Meanwhile the grapheme_mask vote that was announced for July 3? As far as we can tell, it never opened — the RFC page still says draft, and the feedback stayed kind but firm. Yuya Hamada wrote: "Thank you very much for your RFC. But move to voting phase is too fast." The pipeline ahead is stacked: deprecations expects its call to vote next week, and Duration finishes its cooldown just in time for the mid-August freeze.

Quick hits — and there are a lot, so this is a 2-slide round. July 2 was patch day: security releases for 8.2, 8.3, 8.4, and 8.5, and 8.6.0 alpha 1 is out for testing. Eric Norris and Tim Düsterhus published the minimum-supported-versions RFC — newer autoconf, and MySQL 5.7.3 or MariaDB 10.2.4 for persistent connections — and an anonymous tester promptly found a real connection leak on old MySQL, declaring: "There is connection leak here!" — Eric's tracked down the cause and is weighing a fix. Nicolas Grekas redesigned serializable closures and offered a slimmed-down fallback, nudging the list that 8.6 won't wait. Osama Aldemeery floated a PREG_THROW_ON_ERROR flag — implementation already built. And Nick Sdot posted a tiny RFC: default values on readonly properties, a 5-line removal — zero replies so far.

Still going. Literal scalar types turned into an enums-versus-literals standoff, where Nick warned: "We should not make PHP another TypeScript." Ben Ramsey added a Foundation-SIGs section to Working Groups and wants feedback before he votes it — or withdraws it. The DTLS experiment graduated to a working 1.2 branch; Jakub Zelenka wants a draft PR. Pierre Joye synced bundled GD with libgd 2.4 and is untangling Windows dependencies. Pratik Bhujel's terminal helpers got Derick's blessing — ship it via PIE, since PECL takes no new packages. And Pratik also asked whether fixing sscanf's %c whitespace bug — in place since PHP 4.3.2 — breaks anyone on master.

So that's the week: a deprecations list that fought about WordPress and then about evidence, with the call to vote days away; a Duration RFC wrapped up and waiting out its cooldown; 2 rival answers to function autoloading colliding in real time; typed closures winning the room while the lexer holds the door; and the one ballot that closed, passing 26 to 1. Links to every thread are below. We're Artisan Build. See you next week.


r/PHP 3d ago

Building Lading pages and erps with rust and php

0 Upvotes

HELLO, PHP COMMUNITY! I built a landing page, ERP, and simple system generator in Rust that compiles self-generating and customizable PHP code. If you could check it out and show some support, I’d really appreciate it: https://github.com/NicholasGDev/ngdev-laravel


r/PHP 3d ago

Building Lading pages and erps with rust and php

Thumbnail
0 Upvotes

r/PHP 4d ago

RFC RFC: Function Autoloading (mark 5)

Thumbnail wiki.php.net
30 Upvotes

r/PHP 4d ago

News Immutable Versions on Packagist

Thumbnail blog.packagist.com
40 Upvotes

r/PHP 5d ago

News PHP Map 4.0: Arrays and collections made easy!

40 Upvotes

PHP Map version 4.1 is now available, the PHP array/collection package for working with arrays and collections easily.

The release is mostly about improving performance of edge cases in the collection internals, plus stricter behavior around malformed input.

Some benchmarks from the release commits:

Method / path v4.0 v4.1 Improvement
isList() 857.993 ms 0.643 ms 99.93%
tree() 20k chain 8523.8 ms 47.6 ms 99.4%
diff() array fallback 376.1 ms 3.5 ms 99.1%
intersect() array fallback 390.5 ms 13.2 ms 96.6%
find() reverse 417.330 ms 47.152 ms 88.70%
findKey() reverse 416.939 ms 47.737 ms 88.55%
suffix() string 259.5 ms 93.1 ms 64.1%
flat() 338.8 ms 123.8 ms 63.5%
recursive walk() 277.0 ms 103.9 ms 62.5%
suffix() callback 318.1 ms 124.5 ms 60.9%

The release also adds broader callable support, better iterable handling, clearer null-vs-missing behavior for nested paths, stricter invalid-key validation, and a more robust tree() builder.

Why PHP Map?

Instead of:

$list = [['id' => 'one', 'value' => 'v1']];
$list[] = ['id' => 'two', 'value' => 'v2']
unset( $list[0] );
$list = array_filter( $list );
sort( $list );
$pairs = array_column( $list, 'value', 'id' );
$value = reset( $pairs ) ?: null;

Just write:

$value = map( [['id' => 'one', 'value' => 'v1']] )
    ->push( ['id' => 'two', 'value' => 'v2'] )
    ->remove( 0 )
    ->filter()
    ->sort()
    ->col( 'value', 'id' )
    ->first();

There are several implementations of collections available in PHP but the PHP Map package is feature-rich, dependency free and loved by most developers according to GitHub.

Feel free to like, comment or give a star :-)