We're not comparing Rust vs PHP as languages. Rust is obviously faster in isolation, no argument there. We're comparing a specific framework: Laravel for Rust vs its PHP counterparts on the same API. "Of course PHP is the bottleneck" is exactly the assumption we tested, and here it didn't hold.
Oh, we also built an MCP server and a set of skills for Buggregator Trap and Server, allowing agents to use xDebug during the debugging process. Furthermore, it includes support for profilers, var-dumps, logs, email, Sentry, telemetry, and much more.
Now I’ll add a skill for the PHP Debugger, so that your tool can be used more extensively.
You could check out OpenIDE (not to be confused with OpenIdea) -- it’s a fork of IDEA that’s free, runs faster, and supports many languages right out of the box. I personally chose it for its AI-agent session manager (I’m not a fan of using ClaudeCode in the terminal).
I also noticed that AI support has been added to PHPStorm via the AIR plugin, though I haven’t tried it out yet.
---
For my part, I’m actually somewhat glad about this AI explosion -- it enabled the creation of a fantastic IntelliJ IDEA plugin for running tests. The irony, however, is that with the AI boom, this plugin is now completely unnecessary.
While this is true, we're not talking about a hello world call into a C function. Calls from Go to PHP are almost always long C calls with heavy data processing. So in the real world, the overhead is far from negligible; it is clearly visible in benchmarks.
Coding agents like Claude Code, Cursor and Codex read "skills": folders with a SKILL.md that describe a library's conventions and recipes. Most people copy them in by hand, and the copies soon fall out of date with the code.
My idea is to keep skills in the library's own repository, next to the code. On composer install, the plugin finds them and syncs them into .agents/skills/. It also symlinks .claude/skills, .cursor/skills and so on to that folder. When you update a package, its skills update too. You can also pull skills from any GitHub or GitLab repository, pin a version, and pick only the skills you want.
Security. A skill is a set of instructions that the agent runs with your permissions, so any dependency could use one for prompt injection. By default, only your direct dependencies are trusted, because you chose them yourself. Skills from transitive dependencies are skipped unless the vendor is on an allowlist. Archives are checked for path traversal, and skills:show / --dry-run show what would be installed and why.
composer require --dev llm/skills
I'd love feedback, especially from library authors.
Reading this from the PHP/Spiral + RoadRunner side, most of your principles map 1:1, with one difference: in several places we use the same tools etcd does rather than PHP analogs. .proto files are the actual source of truth -- DTOs and clients are generated from them, not written by hand. gRPC interceptors handle cross-cutting concerns instead of Messenger middleware. Observability is wired into the runtime rather than added per-handler. With RoadRunner's Connect plugin the browser story is solved too, so "REST" has essentially disappeared from our stack. Goodbye to OpenAPI annotations and hello .proto.
A couple of things worth adding rather than just nodding along:
On contracts (principle 1). One thing the comparison flattens: DTOs and .proto files don't live in the same place. A DTO is the contract within a service - PHPStan catches it when the controller and the service disagree about a type. A .proto file is the contract between services: change a field, and every consumer's build fails on the next regeneration. And if you follow proto's evolution rules, you can keep shipping changes without breaking any consumer. Tools like buf breaking enforce this in CI.
On "simple outside, rocket science inside" (principle 5). This is essentially the design philosophy Temporal is built on: yield $activity->charge($order) hides retries, durability, recovery from process death, the whole thing. Working with it for a year did more for my sense of distributed systems discipline than any amount of "best practices" reading.
Testo is just getting started, and before we can accomplish such great things, we first need to push the framework to release and achieve full feature parity with other frameworks.
In any case, I suggest moving this topic to Testo Issues.
PHP's testing is actually quite good. There's an xUnit implementation in the form of PHPUnit. There's PEST for Jest fans. There's Codeception, which is still quite popular and used in modern projects.
For the average user, everything is just fine. The problems begin elsewhere: with framework and library developers. With the open source that underpins everything else.
Let me give you an example. I develop frameworks and SDKs for the enterprise sector. Besides all the requirements for reliability and stability, Enterprise loves LTS versions, even when it comes to PHP versions.
Let's get back to our testing frameworks. Pest and Codeception are based on PHPUnit, so PHPUnit's dictates also apply to them. And every couple of years, PHPUnit breaks backward compatibility and raises the minimum PHP version.
You might say, "It's not so bad, just use the old PHPUnit." Yes, I can use the old PHPUnit until a CVE is discovered that will crash all my pipelines, which is what's been happening lately.
I've been waiting for this extension point for several years. I don't know how many similar requests have been created, but I started working on Testo right after Sebastian closed my issue without even trying to figure it out.
The feature was introduced in PHPUnit 13, but not all library and framework developers can upgrade to it.
You can defend PHPUnit — that's your right. But if a tool doesn't solve the community's problems, then it's only a matter of time before a new one is created.
I'm showing you Testo. It's not necessary for everyone, because PHPUnit or Pest will suffice for 90% of cases.
You don't need to drop everything and switch to it right away, especially if you're happy with everything.
I agree with much of your POV. Yes, I'm not good at marketing, so I didn't load the post with what's in the article, assuming that the developer would spend at least 15 seconds on it and get answers to their questions. I will likely follow your advice when Testo is released.
By independent architecture, I meant that it's not just another wrapper over PHPUnit.
I also agree that if PHPUnit suits you, there's no reason to look at something else. This applies to any stack, really.
Should I retry to sell you this new car in the comments?
I try to get rid of "parasitic" packages because they clutter navigation in PHP Storm.
I wrote a package roxblnfk/unpoly that removes polyfill-php* packages.
And you know what I encountered in one of the projects? There was a conflict with the polyfill-php72 (or 71, doesn't matter) in some dependency. Since my unpoly replaces polyfills, the package manager thinks that some package conflicts with mine.
Solution: roxblnfk/unpoly now has many versions, adding one polyfill at a time in descending order in each version.
We're not comparing Rust vs PHP as languages. Rust is obviously faster in isolation, no argument there. We're comparing a specific framework: Laravel for Rust vs its PHP counterparts on the same API. "Of course PHP is the bottleneck" is exactly the assumption we tested, and here it didn't hold.
Oh, we also built an MCP server and a set of skills for Buggregator Trap and Server, allowing agents to use xDebug during the debugging process. Furthermore, it includes support for profilers, var-dumps, logs, email, Sentry, telemetry, and much more.
Now I’ll add a skill for the PHP Debugger, so that your tool can be used more extensively.
There are my benches with Testo https://github.com/php-testo/testo/pull/443#issuecomment-7041462176 (comment)
You could check out OpenIDE (not to be confused with OpenIdea) -- it’s a fork of IDEA that’s free, runs faster, and supports many languages right out of the box. I personally chose it for its AI-agent session manager (I’m not a fan of using ClaudeCode in the terminal).
I also noticed that AI support has been added to PHPStorm via the AIR plugin, though I haven’t tried it out yet.
---
For my part, I’m actually somewhat glad about this AI explosion -- it enabled the creation of a fantastic IntelliJ IDEA plugin for running tests. The irony, however, is that with the AI boom, this plugin is now completely unnecessary.
While this is true, we're not talking about a hello world call into a C function. Calls from Go to PHP are almost always long C calls with heavy data processing. So in the real world, the overhead is far from negligible; it is clearly visible in benchmarks.
llm/skills: AI skills as dependencies
https://github.com/roxblnfk/skills
Coding agents like Claude Code, Cursor and Codex read "skills": folders with a
SKILL.mdthat describe a library's conventions and recipes. Most people copy them in by hand, and the copies soon fall out of date with the code.My idea is to keep skills in the library's own repository, next to the code. On
composer install, the plugin finds them and syncs them into.agents/skills/. It also symlinks.claude/skills,.cursor/skillsand so on to that folder. When you update a package, its skills update too. You can also pull skills from any GitHub or GitLab repository, pin a version, and pick only the skills you want.Security. A skill is a set of instructions that the agent runs with your permissions, so any dependency could use one for prompt injection. By default, only your direct dependencies are trusted, because you chose them yourself. Skills from transitive dependencies are skipped unless the vendor is on an allowlist. Archives are checked for path traversal, and
skills:show/--dry-runshow what would be installed and why.I'd love feedback, especially from library authors.
Seems interesting. Please ping me there https://github.com/php-testo/testo/issues/296 after 1.0.0 release
Done
https://php-testo.github.io/docs/plugins/filter#testo-filter-group
It's my mistake there. Of course it's protobuf, not gRPC.
Also, ext-grpc needs to be installed for RoadRunner. But who reads documentation these days?
Reading this from the PHP/Spiral + RoadRunner side, most of your principles map 1:1, with one difference: in several places we use the same tools etcd does rather than PHP analogs.
.protofiles are the actual source of truth -- DTOs and clients are generated from them, not written by hand. gRPC interceptors handle cross-cutting concerns instead of Messenger middleware. Observability is wired into the runtime rather than added per-handler. With RoadRunner's Connect plugin the browser story is solved too, so "REST" has essentially disappeared from our stack. Goodbye to OpenAPI annotations and hello.proto.A couple of things worth adding rather than just nodding along:
On contracts (principle 1). One thing the comparison flattens: DTOs and
.protofiles don't live in the same place. A DTO is the contract within a service - PHPStan catches it when the controller and the service disagree about a type. A.protofile is the contract between services: change a field, and every consumer's build fails on the next regeneration. And if you follow proto's evolution rules, you can keep shipping changes without breaking any consumer. Tools likebuf breakingenforce this in CI.On "simple outside, rocket science inside" (principle 5). This is essentially the design philosophy Temporal is built on:
yield $activity->charge($order)hides retries, durability, recovery from process death, the whole thing. Working with it for a year did more for my sense of distributed systems discipline than any amount of "best practices" reading.Yes, in that regard, it's true 👍
I use the package as a dev dependency in libraries, so it helps during package development, but doesn't affect other projects.
It seems you're a very driven person.
Testo is just getting started, and before we can accomplish such great things, we first need to push the framework to release and achieve full feature parity with other frameworks.
In any case, I suggest moving this topic to Testo Issues.
PHP's testing is actually quite good. There's an xUnit implementation in the form of PHPUnit. There's PEST for Jest fans. There's Codeception, which is still quite popular and used in modern projects.
For the average user, everything is just fine. The problems begin elsewhere: with framework and library developers. With the open source that underpins everything else.
Let me give you an example. I develop frameworks and SDKs for the enterprise sector. Besides all the requirements for reliability and stability, Enterprise loves LTS versions, even when it comes to PHP versions.
Let's get back to our testing frameworks. Pest and Codeception are based on PHPUnit, so PHPUnit's dictates also apply to them. And every couple of years, PHPUnit breaks backward compatibility and raises the minimum PHP version.
You can defend PHPUnit — that's your right. But if a tool doesn't solve the community's problems, then it's only a matter of time before a new one is created.
I'm showing you Testo. It's not necessary for everyone, because PHPUnit or Pest will suffice for 90% of cases.
You don't need to drop everything and switch to it right away, especially if you're happy with everything.
Testo is just getting started. I think Mockery could be great for mocks.
It seems you don't take into account the expressiveness and cleanliness of the code.
Oh, you're (absolutely) right: it would be possible to port all the features to PHPUnit, and even more. But there's one problem: it does not evolve.
Many features and improvements simply can't get there because of the high barrier. PHPUnit is afraid of innovation.
In fact, Testo is very late. It wasn't worth waiting so long for some miracle from PHPUnit; Testo should have been created five years ago.
TestCase. Fust classes or functions.#[Test],#[TestInline],#[Bench],#[ExpectException],#[Retry],#[Repeat],#[DataSet],#[DataCross],#[BeforeTest], etc...
Benchmarks using just one attribute
#[Bench( callables: [ 'alternative' => [self::class, 'sumInCycle']], arguments: [1, 5_000], )] public static function sumInArray(int $a, int $b): int { return \array_sum(\range($a, $b)); }
Inline tests for simple pure private functions
#[TestInline([1, 1], 2)] #[TestInline([40, 2], 42)] #[TestInline([-5, 5], 0)] private static function sum(int $a, int $b): int { return $a + $b; }
Yes
Just feed to AI agents
llms.txtorllms-full.txthttps://php-testo.github.io/docs/ai-agentsIt's literally one line in composer.json and a few lines in composer.lock because of metapackage. In return, I get a clean vendor directory.
Good deal.
I agree with much of your POV. Yes, I'm not good at marketing, so I didn't load the post with what's in the article, assuming that the developer would spend at least 15 seconds on it and get answers to their questions. I will likely follow your advice when Testo is released.
By independent architecture, I meant that it's not just another wrapper over PHPUnit.
I also agree that if PHPUnit suits you, there's no reason to look at something else. This applies to any stack, really.
Should I retry to sell you this new car in the comments?
I try to get rid of "parasitic" packages because they clutter navigation in PHP Storm.
I wrote a package roxblnfk/unpoly that removes
polyfill-php*packages.And you know what I encountered in one of the projects? There was a conflict with the
polyfill-php72(or 71, doesn't matter) in some dependency. Since myunpolyreplaces polyfills, the package manager thinks that some package conflicts with mine.Solution:
roxblnfk/unpolynow has many versions, adding one polyfill at a time in descending order in each version.I didn't spend even half the time on my library as you did, and I didn't even know there was a testing utility 😄
It seems it's time to write proper acceptance tests.
Great work. It's a pity you didn't create this package six months ago. Then I wouldn't have had to make my own.
What issues did you encounter with existing libraries that made you create a new one?
https://packagist.org/?query=%2Ftoml