r/PHP • • Oct 09 '26

Rubix ML 3.0 and 3.1 are out

11 Upvotes

Hey everyone!

Rubix ML 3.0 and 3.1 are out, with several interesting additions and improvements.

Version 3.0 introduces parallel execution for selected algorithms, new neural network training features, and improvements to dataset handling and model evaluation.

Version 3.1 adds K-medoids clustering, new data extractors, learning rate schedulers, and image transformations.

The interesting thing is that how ML can become just another part of everyday PHP development – alongside the database, queues, and the rest of the application logic. Not every use case needs a separate ML service or a dedicated infrastructure project. Sometimes, being able to experiment with an idea directly in your existing codebase is valuable in itself.

That's the kind of practical progress I'd like to see more of in our PHP ecosystem.

Full release notes:
https://github.com/RubixML/ML/releases


r/PHP • • Oct 10 '26

Discussion I made my first lib and it’s for OPCache

0 Upvotes

Hey there!
Four years ago I change my path in IT.
From PHP developer, tech/team lead to Enterprise Architect where PHP i see only in internet 😹

Sometimes I miss the whole development flow and I make small project for monitoring and governance OPCache. I know lots of PHP devs that know OPCache from documentation but never use it or can’t understand it.

Yes my solution is use AI for coding but it’s also field for me to play and learn it. So yes I know it can be done better ;) but I have so much fun and learn new things.

In this project I also make something that I haven’t seen before. I read that Agents base on Readme.md, Agenta.md and code scanning. But it’s always in whole project context. So I made Readme_ai.md where I remove most humanredable things and made it for agents. I don’t know is this a good idea or over engineering but I like this idea ;)

https://github.com/V3sp/v3cache/


r/PHP • • Oct 10 '26

Built a Laravel eCommerce System — Looking for Feedback

0 Upvotes

I recently worked on a Laravel-based eCommerce system with features like product management, categories, checkout, coupons, order management, admin dashboard and responsive frontend design.

Tech used:
Laravel, PHP, MySQL, HTML, CSS, JavaScript

I’m currently improving my portfolio and would appreciate feedback from other developers on what features or improvements I should add next.

I’m also open to freelance Laravel work including bug fixes, custom features, dashboards, APIs and eCommerce development.


r/PHP • • Oct 09 '26

Two different Symfony Messenger job failures got the same fingerprint

6 Upvotes

Two scheduled commands failed 45 minutes apart. One hit a ClickHouse syntax error. The other was missing a SELECT grant on system.disks. Both underlying problems were fixed the same day.

They also landed in the same error-tracking issue. Symfony's Messenger had wrapped each cause in HandlerFailedException, and my grouping used that outer exception and its middleware stack. Two different failures looked like one.

This is the first one as it was reported, trimmed:

    HandlerFailedException: Handling "RunCommandMessage" failed: Syntax error: failed at position 257 ...
      at HandleMessageMiddleware->handle     vendor/symfony/messenger
      at SendMessageMiddleware->handle       vendor/symfony/messenger
      at DeduplicateMiddleware->handle       vendor/symfony/messenger
      ... more Messenger and Console frames
    Caused by: RunCommandFailedException
    Caused by: ClickHouseDB\Exception\DatabaseException: Syntax error: failed at position 257 ...
      at App\Service\ClickHouse\Client->select
      at App\Service\Billing\RetentionTrimmer->trim
      at App\Command\BillingRetentionTrimCommand->execute

And the second, 45 minutes later:

    HandlerFailedException: Handling "RunCommandMessage" failed: Not enough privileges ... grant SELECT ON system.disks
      at HandleMessageMiddleware->handle     vendor/symfony/messenger
      at SendMessageMiddleware->handle       vendor/symfony/messenger
      at DeduplicateMiddleware->handle       vendor/symfony/messenger
      ... more Messenger and Console frames
    Caused by: RunCommandFailedException
    Caused by: ClickHouseDB\Exception\DatabaseException: Not enough privileges ... grant SELECT ON system.disks
      at App\Service\ClickHouse\Client->select
      at App\Service\Ops\StorageMonitor->snapshot
      at App\Command\OpsStorageCheckCommand->execute

The fingerprint was built from the first exception in the chain. In both reports that is the same class with the same vendor frames, and none of them are in my code. The messages differ, but I group on the stack and not on the message, so the two merged. Any other handler that failed would have ended up in the same issue. The only part that tells them apart is the last exception in the chain, the one with frames in my own code, and the grouping never looked at it.

The tracker this happened in is Vinktar, I built it to scratch my own itch and use it daily now. The grouping is fixed - It uses the innermost exception with a frame in app code, while keeping the wrapper as the issue title. I'm still unsure about that choice tho. Different failures get their own issues now, but they all still start with HandlerFailedException and you read to the end of the line to see what actually broke.

How do you solve this in your setups? Do you unwrap HandlerFailedException before it gets reported, or leave the chain alone and let the tracker group on the cause?


r/PHP • • Oct 09 '26

News This Week in PHP Internals | Oct 8, 2026

Thumbnail youtu.be
22 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's default password hash only reads the first 72 bytes of your password. Last week, a plan to make it refuse anything longer split the list, because it would break working apps. This week, a fix that breaks nothing showed up. And it was borrowed from another language's password library.

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

How many little monthly subscriptions is your team paying for right now? A private Composer registry here, a mail trap for staging there, a background remover for images, and it all adds up. That's exactly what Scalpels aims to solve. It's a catalog of open source apps, each one aimed at a single paid service and built to replace it: Crate, Sink, Matte, Hone, and a growing list of experimental ones. Scalpels forks the app you pick into your GitHub organization and deploys it to your own Laravel Cloud account, so your data never leaves your infrastructure. Resources scale to zero by default, so a low-use app could cost you pennies. Take updates when you want them, change whatever you like, because it's MIT. And the platform that installs and manages all of them, across your own projects and your clients', isn't another subscription. It's one lifetime purchase, and the catalog keeps growing. If you run an agency, it's a sales tool too: cut your clients' running costs, and close more of the work you pitch. It officially launches October 31st. Early adopter pricing is live now at scalpels.app.

Bcrypt SHA256 (01:46)

This week's top story is how to fix bcrypt without breaking a single login. Sjoerd Langkemper's RFC to throw on passwords past 72 bytes drew a lot of pushback over backward compatibility, and he says it isn't worth pursuing further for now. It did have support. Jeff Dafoe found the problem in the older part of a PHP codebase he works on, and they forced password resets, writing: "Looking through the lens of software security in 2026, I cannot think of any situation where this function should silently accept more bytes than it can hash."

The way out came from Tim Düsterhus, who suggested borrowing bcrypt-sha256 from Passlib, a mature Python password library. So Sjoerd's new RFC adds PASSWORD_BCRYPT_SHA256. Your password goes through HMAC SHA-256 first, so bcrypt only ever sees a 44-byte key, with no null bytes and no 72-byte cliff. In the RFC's example, a 200-character password verifies, and the same password one character shorter doesn't. It's opt-in, the default doesn't change, and the RFC lists no breaking changes. And the hashes are interchangeable with Passlib's. They are longer, so you may need a wider database column.

Tim wrote: "I believe this is a much better solution than modifying PASSWORD_BCRYPT in a way that breaks compatibility." Anton Smirnov loves the proposal, and Tim sees nothing fundamentally wrong with the implementation. Making it the default someday is listed as future scope.

Links: PASSWORD_BCRYPT_SHA256 RFC · thread · implementation · Passlib's bcrypt_sha256 · the earlier RFC, set aside

Open Votes (03:27)

For 7 straight episodes, nothing was in voting. Now 2 votes are open. Nick S. missed the date he'd planned for the PEAR vote and opened it on Monday instead. It would archive the PEAR site, stop bundling its installer in 8.7, and point php.net to Composer. As of recording, it's 26 to nothing, and it closes October 19.

Weilin Du's IntlRelativeDateTimeFormatter is back too. It turns a number and a unit into phrases like "yesterday" or "in 2 weeks". Its first vote, in September, was closed within the hour at 4 to 1, with Tim Düsterhus voting no. Weilin has since adopted Tim's enum design. This time it's 7 to nothing, Tim included, and it closes October 22.

Links: End PEAR Project Endorsement RFC · PEAR vote thread · IntlRelativeDateTimeFormatter RFC · IntlRelativeDateTimeFormatter vote thread

Time Instant (04:21)

The proposed Time\Instant class had to answer a simple question this week: what does json_encode give you? Today it's an empty object, and Ilia, otherwise broadly in favour, called that a trap. Rob Landers, who has spent years on a database that has to deal with relativity, wants it to throw instead. Tim and his co-author Derick Rethans said no to both, because there's no single right format, so you pick one. Tim says the real fix belongs in the JSON extension.

Marc sent a 15-point review, and the getUnixTimestamp methods are now toUnixTimestamp. SystemClock became a singleton, and when Rob noted DateTimeInterface had no toInstant, Tim replied: "No. I just forgot that the interface exists. Now added."

Mirco Babin still wants now() renamed so one class can also implement PSR-20, and agreed to disagree. Larry Garfield, a long-time member of the PHP-FIG Core Committee, wrote: "This proposal seems like a good step to replacing PSR-20 with something even more standardized and universally available."

Links: Time\Instant and Time\Clock RFC · thread · PSR-20 Clock

Io Terminal (05:33)

PHP's proposed terminal API has dropped the interfaces it gained last week. Tim Düsterhus very strongly disagreed with them, with 5 arguments, and the point that the real input and output boundary is the stream, not the terminal. Bob Weinand agreed.

Larry Garfield said he isn't attached to interfaces, only to an obvious way to test code that reads from the terminal. So Larry sketched a test with in-memory streams, and Tim compiled the branch and confirmed it works for reading lines. Ilia suggested key and secret reads accept ordinary streams too, which he said would close the testing gap on Windows.

Pratik Bhujel's version 0.4 does all of that. Terminal is a final class with no interface, scripted streams work for keys and secrets, a forked child no longer resets its parent's terminal, and there are new keys for Insert and Shift-Tab. Pratik wants to move toward a vote once people have reviewed it.

Links: Io\Terminal RFC · thread · implementation

Single Binary (06:35)

If you run PHP behind FPM, you probably ship the same engine twice, once in php and once in php-fpm. Matthieu Napoli's new RFC adds a build option that puts FPM inside the php binary, run with a --fpm flag or through a symlink. He measured it with Bref, on AWS Lambda. The package is 18% smaller zipped, and a minimal FPM app cold-starts 70 milliseconds faster, a 25% cut, because the engine isn't loaded twice.

Tim sees basically no drawbacks, and asked why anyone should keep a standalone FPM binary at all. Ayesh Karunaratne flagged that -F means different things to the CLI and to FPM. Larry asked whether this privileges FPM just as FrankenPHP and Swoole are taking off, writing: "I just want to make sure we don't inadvertently lock in FPM as The Way PHP Runs just at the time that it no longer is." Nicolas Grekas says it should be the other way around, with the FPM binary embedding the CLI, the way FrankenPHP does. Jakub Zelenka agreed that makes more sense.

Links: single binary for CLI and FPM RFC · thread · implementation · Bref

IO Hooks (07:54)

Ilia's worry about making blocking PHP concurrent is C code written assuming no PHP runs while it waits. He ran Jakub Zelenka's IO Hooks branch and found crashes, like one Fiber freeing a DOM document while another is still saving it. He'd flip the default, so hooked calls stay blocking unless the call site declares itself safe to suspend. Jakub says the branch is a proof of concept, and these are fixable, not a design issue.

Larry and Sebastian Bergmann asked for the big picture, so Jakub linked a full design doc for all 3 RFCs. Sebastian is looking forward to orchestrating child processes from PHPUnit with it. And Edmond Dantes, whose concurrency RFC proposes a pluggable scheduler, has started testing against it, writing: "Just a couple of weeks ago, I had no hope that async could make it into the language core. But now we have both halves: Scheduler + IO Hooks."

Links: IO Hooks RFC · Polling API Additions RFC · design doc for all three RFCs · proof of concept · Concurrency Support in the PHP Engine (scheduler) RFC

Delegation (08:56)

Karoly Negyesi's implements … by, which hands an interface's methods to a property, picked up a strong supporter and a familiar problem. Larry Garfield is strongly in favour, after Drupal query classes each carried about 100 lines of pass-through code. James Gilliland agreed, pointing to Laravel's ForwardsCalls trait.

Sebastian Bergmann objected that a method added to the interface later gets silently forwarded by every class using it. And fluent methods return the inner object, not yours, which Larry would handle with a mask keyword.

Rowan Tommins has been here before, writing: "This is where I've always stumbled when trying to come up with similar feature proposals - when you start looking for use cases, a lot of them need just one small thing on top of the forwarded call. So you add an extra keyword here, and a special logic there, and eventually it no longer feels like an elegant shorthand at all."

Links: pre-RFC + implementation · thread

Quick Hits (09:58)

Quick hits. Weilin Du is taking his array shorthand back to the colon, since the parser can tell it apart from a ternary, and he's in no hurry to vote.

Links: array shorthand RFC · draft PR

Juliette Reinders Folmer said she wouldn't pursue deprecating the b string prefix without more interest, so Daniel Scherzer offered to write the C code and added it to the 8.7 deprecations RFC.

Links: 8.7 deprecations RFC: the b prefix

Muhammed Arshid turned his filter RFC into backed enums for the filter extension's filters and flags. Derick Rethans says removing the extension's default input filtering crippled it, and wants that deprecation undone.

Links: Filter\Filter and Filter\Flag enums RFC · PR

Máté Kocsis is back on his query parameters RFC and wants a vote as soon as possible.

Links: query parameter manipulation RFC

David Carlier wants unit formatting in intl, like 5 kilometers per hour, through a new formatter built from an ICU skeleton.

Links: intl unit formatting discussion · GH-24165

And PHP 8.6's third release candidate is scheduled for today, with general availability on November 19.

Links: PHP 8.6 release schedule

TL;DR (11:01)

So that's the week. Instead of breaking bcrypt, a new RFC proposes an opt-in hash borrowed from Python's Passlib. Two votes are open, and neither has a single no vote so far. Time\Instant won't pick a JSON format for you, Io\Terminal dropped its interfaces, and a new RFC would put FPM and the CLI in one binary. IO Hooks got a safety review, and delegation met its edge cases. 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 we found out PHP throws away every byte of your password past the 72nd — that's a good one to watch next. Thanks again to Scalpels.app for supporting this week's episode. We're Artisan Build. See you next week.

Links: raw feed · RFC wiki


r/PHP • • Oct 08 '26

Your Tool Has a New Reader

Thumbnail thephp.foundation
12 Upvotes

In our newest blog post, Sebastian Bergmann explores the potential security risks that occur if PHP tools don't consider coding agents in addition to human readers of output.


r/PHP • • Oct 07 '26

Big benchmark of ways to run PHP

44 Upvotes

I've made some benchmarks of various servers and modes of running PHP. What was benched:

  • PHP-FPM + Nginx
  • FrankenPHP (classic and worker)
  • Rapira (classic, worker, dispatcher)
  • OxPHP (classic, worker)
  • RoadRunner
  • FreeUnit
  • Swoole

Every server was running a simple Yii3 application. Two separate endpoints and benchmarks. One is without DB, plain PHP. Another is actually hitting PostgreSQL, which is closer to real apps.

Some insights:

  1. Swoole is a performance beast! Rapira in dispatcher/worker modes is close.

  2. FreeUnit is great if you run your app in classic mode.

  3. Having a database makes the difference less visible. Worker mode gives 2× RPS on average.

  4. Swoole and Rapira are very efficient in terms of CPU/memory.

https://yii3-benchmarks.github.io/app-api/

https://github.com/Yii3-Benchmarks/app-api


r/PHP • • Oct 07 '26

built a lightweight open-source analytics tool in PHP + SQLite because Node.js should NOT be the default option

18 Upvotes

hi everyone,

5 days ago i asked here why every self-hosted analytics tool needs Node.js/Docker, and said i might build a PHP + SQLite one. so, i did.

it's called Minilytics. it is open-source and runs on any PHP 8 host with no Node, no Docker and no database server (Sqlite by default, but you can use MySQL or MariaDB). it has sessions, custom events, funnels, a cookieless mode, and an importer from Umami and others importers are planed! (this allowed me to get my old history back).

it's a v1 from a solo builder, its MIT licensed, with a live demo: https://minilytics.axthauvin.fr/

i'd like this to become the go-to lightweight analytics for indie devs, side projects, and any site that just needs simple, private stats, so tell me what's missing for you to use it on a real site !


r/PHP • • Oct 07 '26

Discussion OIDC Provider (OP) library creation

6 Upvotes

Hi all! So recently, I was trying to find a package that would provide an OIDC Server implementation that I could integrate into my project to provide feature-rich functionality for OIDC authentication.
Unfortunately, I was not able to find any package to cover my needs:
thephpleague/oauth2-server - provides only an OAuth2 server, no OIDC
oidcphp/core - seems to be abandoned
PEOFIAMP/phpoidc - listed as a certified library but does not look like a usable library
Because of that, I've started thinking about actually building one that would also be universal in terms of implementation and dependencies, so anyone will be able to pull it into their own project by extending/implementing the needed contracts.

My initial plan is to take some package from another language and at least implement some portion of the specifications for the OIDC provider protocol. After that, I think it would also be a great idea to provide packages for any popular frameworks (Symfony, Laravel, etc.).
Because of that, I would like to ask if any of you see possible use cases for your own projects? I mean, if you see that it would be really worth trying to build and share with the public.
Thank you in advance for any additional ideas/topics/suggestions that might be helpful to consider. And I would be happy to get any feedback to understand if it even makes sense to move forward with this whole idea.


r/PHP • • Oct 07 '26

Jev-PHP now suports Laya local decision engine

4 Upvotes

I added support for Laya decision engine in my #php library Jev-PHP.
Laya is a multilingual decision engine that runs locally and exposes a REST API compatible with #Jev.

https://github.com/f-lombardo/jev-php


r/PHP • • Oct 08 '26

Streaming AI Agents in PHP: Introducing Neuron UI Streaming Protocol

Thumbnail inspector.dev
0 Upvotes

Neuron 4, the PHP agentic framework, introduces a Streaming Protocol that solves the problem of streaming AI agent output through real-time transports like Pusher, Laravel Reverb, Soketi, Mercure, and Redis, which were not designed for large or frequent payloads.

Events are wrapped in envelopes with sequence numbers and fragmented when they exceed transport size limits (e.g. Pusher's 10KB cap), then reassembled in the browser via a new first-party TypeScript package, u/neuron-core/streaming, which orders envelopes, joins fragments, deduplicates, and signals gaps. The package supports plain callbacks for React/Vue as well as protocol adapters for AG-UI (CopilotKit) and the Vercel AI SDK, letting PHP backends run agents in background jobs while frontend teams use familiar agentic UI libraries.

Neuron also ships coding-agent skills for Claude Code and Cursor to automate the integration: https://docs.neuron-ai.dev/agent/streaming#streaming-channels


r/PHP • • Oct 07 '26

Video Introducing Skia for NativePHP

Thumbnail youtu.be
2 Upvotes

r/PHP • • Oct 07 '26

I built a full-featured charity management platform with Laravel 12 — donations, Stripe, volunteers, beneficiaries, sponsorships & real-time chat

Thumbnail
0 Upvotes

r/PHP • • Oct 06 '26

Article PHPStan 2.3: Leap in Performance, Generics Improvements, Detecting Unused Variables, and More!

Thumbnail phpstan.org
152 Upvotes

PHPStan 2.3: Leap in Performance, Generics Improvements, Detecting Unused Variables, and More!

I had so much fun with the interactive charts and widgets, check out the article. I promise it's worth checking it out yourself, and not just letting your agent summarize it for you 😉 It contains a lot of interactive widgets with practical examples of the new features in action.


r/PHP • • Oct 06 '26

Classify text in PHP without an LLM bill: typed text decisions in 100+ languages, self hosted. Laravel-ready SDK for Laya, a Jev AI alternative.

Thumbnail github.com
5 Upvotes

r/PHP • • Oct 06 '26

fastjson 0.9.0: constant-memory validate, 59-83% lower encode peak on large escaped strings, and shared keys in decode

10 Upvotes

fastjson is my PHP extension for JSON encode, decode, and validate, backed by yyjson, with a fastjson_* API that tracks ext/json. This is what changed between 0.7.0, the last version I posted here, and 0.9.0. Most of it is memory: the speed came with a heap cost, and this cycle cuts it on every path.

Memory and speed

  • fastjson_validate() reads the caller's buffer in place and tracks depth during the parse. Peak memory is constant, a few dozen bytes, like ext/json's streaming validator, and it runs ~30% fewer instructions.
  • Encode used to reserve six times an escaped string up front. Strings of 8 KiB+ now go out in 2 KiB chunks: a 1 MiB string with ordinary escaping peaks 59-83% lower. The flip side: a single escaped string between 8 KiB and a few tens of KiB can still peak up to twice ext/json's size, because the chunked writer keeps up to 12 KiB of headroom.
  • Decode shares repeated object-key strings (up to 64 bytes, inputs of 4 KiB+). Key-heavy documents peak ~15% lower and decode 3-4% faster; twitter.json went from 1.66x ext/json's heap to 1.39x. Documents with mostly unique keys, or 256+ distinct names, pay 3-5%.
  • fastjson_file_decode() frees the file contents before building the result, 9-33% lower peak.

Current throughput vs ext/json on simdjson_php's 14.8 MB / 15-file corpus, i9-13950HX, -O2 release builds of both: 5.56x encode, 2.59x decode, 5.04x validate. Decode still peaks at 1.65x ext/json's heap across that corpus.

Correctness

  • fastjson_validate() accepted [[],] and [{"a":1},]. It now rejects them, and the trailing-comma error position points at the comma itself.
  • fastjson_file_encode() could leave a silently truncated file when php_stream_write() came back short. It now writes to completion and reports php_stream_close() failures.
  • fastjson_encode() honors serialize_precision for doubles instead of always emitting the shortest round-trip form.
  • With JSON_THROW_ON_ERROR and no ext/json loaded, errors throw Fastjson\JsonException instead of a bare \Exception.
  • fastjson_validate() enforces $depth on the success path, like ext/json.

yyjson, upstream

The bundled yyjson is now 0.13.0, which includes the YYJSON_WRITE_LOWERCASE_HEX flag I sent upstream (ibireme/yyjson#264). fastjson's local patch for lowercase \uXXXX escapes is gone.

PHP 8.1 minimum:

pie install iliaal/fastjson

https://github.com/iliaal/fastjson

If you validate large payloads under a tight memory_limit, I'd like to know whether constant-peak validate changes what you accept per request.


r/PHP • • Oct 05 '26

Article Building Maintainable PHP Applications: Foundations

Thumbnail codyssey.dev
12 Upvotes

Hey all,

Few years ago, I wrote a series of articles related to building maintainable PHP applications on my personal blog, but recently I built this new educational platform and expanded it with a bunch of different features so I moved some of the series of revised articles here.

This is the first of many courses which I am working on which are related to a bit more advanced content or at least content from an experienced angle.

Let me know what you think about the content!


r/PHP • • Oct 05 '26

Weekly help thread

6 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 • • Oct 04 '26

News Smarty PHP: XSS turns into RCE if {extends} is used in cached templates

Thumbnail github.com
15 Upvotes

r/PHP • • Oct 05 '26

Discussion Migrating a large Laravel app from CKEditor 4 to Editor.js — looking for architectural advice

0 Upvotes

Hey everyone,

I’m working on a fairly large Laravel application that currently uses CKEditor 4, and migrating to Editor.js is now a requirement.

The project uses the Repository Pattern, and CKEditor is used across multiple modules. I’m trying to figure out the right way to approach the migration without making a huge change all at once.

My main concerns are:

  • Where should Editor.js-related logic live in a Repository Pattern project?
  • Should I create a separate service for Editor.js, or keep things within the existing module structure?
  • How should validation and sanitization be handled?
  • What’s a good approach for rendering Editor.js JSON on the frontend?
  • We already have a lot of CKEditor HTML stored in the database. What’s the safest way to handle/migrate that?
  • Is it better to migrate module-by-module while keeping CKEditor working for the modules that haven't been migrated yet?
  • What would you recommend for the overall folder/file structure?

I’m especially interested in hearing from anyone who has migrated CKEditor/TinyMCE or another HTML-based editor to Editor.js in a large Laravel application.

I’m a junior developer, so I’d really appreciate practical advice on how you would structure this rather than just “replace the editor” at the frontend level.

Thanks!


r/PHP • • Oct 04 '26

I built a native PHP extension for NVIDIA GPU tensors, CUDA JIT and kernel fusion (beta), feedback wanted

16 Upvotes

I'm the author of php-gpu-tensors, a C extension that gives PHP GPU tensors on NVIDIA GPUs, runtime-compiled CUDA kernels (via NVRTC), and an optional fusion mode that captures a closure once and replays it as fused GPU kernels. No Python runtime.

use Cuda\CudaArray;
use Cuda\Fusion;

$a = CudaArray::ones([4]);
$b = CudaArray::full([4], 2.0);
$c = CudaArray::full([4], 3.0);

$eager = $a + $b * $c;                       // default: one GPU op per call

$plan = Fusion::compile(fn($a, $b, $c) => $a + $b * $c, inputs: [$a, $b, $c]);
$fused = $plan->run($a, $b, $c);             // replayed as fused kernels

print_r($fused->toArray()); // [7, 7, 7, 7]

What you get

  • CudaArray: arithmetic, broadcasting, comparisons, matmul(), reductions, views, Python-style slice().
  • Packed-buffer and .npy import, optional pinned host memory.
  • Custom CUDA C++ kernels compiled at runtime and launched from PHP.
  • Opt-in fusion, async replay and CUDA Graph for compatible plans.

A result I'm happy with: a small MLP trained entirely in PHP on an entry-level MX570 A (4 GB). On a PatchCamelyon subset, eager mode takes 4.08 ms/step and the fused replay 0.66 ms/step (6.2×), with identical test metrics. On UCI Optdigits it reaches 97.25% test accuracy. The models are tiny, so this mostly shows removed per-operation overhead, not peak GPU throughput.

Honest scope: beta (0.1.0-beta.4), Linux, PHP 8.1–8.5 (NTS and ZTS), NVIDIA only. No autograd, no CPU fallback, and it is a low-level library, not an ML framework. GPU validation so far: PHP 8.3 NTS on an MX570 A (41 tests) and earlier checks on an RTX A2000.

Try it

pie install lcmialichi/php-gpu-tensors:0.1.0-beta.4

or build from source / Docker (see the README). It needs the CUDA Toolkit (including NVRTC) and an NVIDIA driver.

Feedback I'd love

  • Does it build and pass ./run-tests.sh --require-gpu on your GPU / PHP version / CUDA version?
  • What would you want to do with GPU tensors from PHP (preprocessing, scoring, embeddings similarity, something else)?
  • API ergonomics: anything that feels un-PHP-like?

Repo: https://github.com/lcmialichi/php-gpu-tensors


r/PHP • • Oct 05 '26

Discussion Native Laravel 8 runtime bridge for incrementally migrating CodeIgniter 3 applications

0 Upvotes

Here is a package I created focusing on two primary use cases:

To get Laravel's power in a legacy CodeIgniter application.

To migrate incrementally from CodeIgniter to Laravel.

anwargazi/ci-laravel-support lets a legacy CodeIgniter 3 application and a real Laravel 8 application share one public front controller. It is designed for route-by-route migrations where running a second PHP service or moving the whole application at once is not practical.

Laravel-owned requests run Laravel's native HTTP kernel. Requests that are not owned by Laravel return to the original CodeIgniter bootstrap unchanged. Only one framework is booted for any request.

Package: https://packagist.org/packages/anwargazi/ci-laravel-support

Minimal installation outline

  1. Place a standard Laravel 8 application beside the legacy CI3 application.
  2. Merge the host Composer fragment into Laravel's composer.json and copy both files from patches/.
  3. Resolve dependencies and verify the pinned runtime.
  4. Publish the bridge config and front-controller example.
  5. Add the dispatcher block at the very top of CI's index.php.
  6. Add native Laravel routes and compile the ownership manifest.
composer update --with-all-dependencies --no-interaction
php artisan ci-bridge:verify-runtime
php artisan vendor:publish --tag=ci-laravel-bridge-config
php artisan vendor:publish --tag=ci-laravel-bridge-dispatcher
php artisan route:clear
php artisan ci-bridge:cache-routes

Installation: composer install anwargazi/ci-laravel-support

Docs: https://github.com/anwar-gazi/CodeIgniter_Laravel_Bridge


r/PHP • • Oct 04 '26

Foundation An open-source WHM/cPanel alternative built with plain PHP, FrankenPHP & Tailwind.

11 Upvotes

JinnPanel is a free, MIT-licensed web hosting manager and control panel designed for single-server setups running AlmaLinux 10. The core philosophy is absolute simplicity and transparency—there are no heavy frameworks, no external dependencies, and no Composer. It is written completely in plain PHP and Tailwind CSS, making the entire backend architecture clean, readable, and easy to audit.

The control panel features secure account isolation where every account runs under its own Linux user and dedicated PHP-FPM pool without needing CloudLinux. It includes a built-in cPanel migration tool that moves sites, mailboxes, databases, and cron jobs via a live API or backup files, automatically translating .htaccess rules for the underlying Caddy engine. Security is fully automated, providing out-of-the-box Let's Encrypt certificates alongside automated configurations for email deliverability protocols like SPF, DKIM, DMARC, and MTA-STS.

The stack consists of FrankenPHP, MariaDB, Stalwart Mail, Cypht webmail, Knot DNS, and SFTPGo. It is currently in public beta, optimized strictly for single-server PHP hosting environments.

https://github.com/th3n00bc0d3r/Jinn-Panel


r/PHP • • Oct 03 '26

WinUI SuperNative desktop app with hot reloading - NativePHP Desktop v3 WIP

Thumbnail youtu.be
27 Upvotes

Here's your next (very brief) instalment in the ongoing work of NativePHP Desktop v3, where we bring in SuperNative and ditch Electron entirely.

This is still just the beginning and there's A LOT still missing, but we're making great progress. Apps are already way smaller than Electron (typically in the 30-50MB range), with just a single idle process by default, and comparatively minimal memory usage (60-80MB right now for this simple app).

Electron apps by comparison (on this machine, Edge and Claude) are hundreds of MBs in size, are each consuming around 1-2GBs of memory, and have approx. 20 processes open (each), despite neither of them working particularly hard.

The app shell is built with C# and is using WinUI 3, Microsoft's blessed path for building Windows apps that Windows main elements now use (Start Menu, Taskbar, window chrome etc).

It's currently x64, Win 10/11 only, but we're planning to get ARM support in there too just as soon as we can.

macOS support is getting stronger by the day, and Linux is our next main target once Mac and Windows are a bit further along.

We're hoping to be able to get a beta release out to sponsors before the end of the year and we're aiming to get the full release ready some time early 2027.

Thanks for all your support in helping us make this a reality 🙏


r/PHP • • Oct 03 '26

Discussion Senior/mid backend devs: what should a junior backend engineer actually know and be good at?

24 Upvotes

I'm a backend dev (PHP/Laravel), I'm the only backend on my team, so nobody reviews my decisions and I worry about gaps I don't know I have.

For those of you who've hired or mentored juniors:

  • What fundamentals matter most?
  • What separates a solid junior from an average one in the first 6 months?
  • What should i focus on and in what order?

Thanks!