PHP Architect

PHP Architect Continuing education for developers BY developers. We offer a PHP magazine, training, books, and con

php[architect} is the oldest PHP only magazine in publication. Each month it features articles on PHP and related technologies. From reviews to HOW TOs, each issue is packed with the info PHP developers need to continue growing and learning.

The PHP Podcast 2026.07.30 The PHP Podcast – July 30, 2026Hosts: Joe Ferguson, Sara Golemon & Holly SchillingTime travel...
07/31/2026

The PHP Podcast 2026.07.30
The PHP Podcast – July 30, 2026
Hosts: Joe Ferguson, Sara Golemon & Holly Schilling
Time travel is real, birds aren’t. The gang argues about Fahrenheit vs. Celsius, boiling rocks, and stones (the weight kind), then gets into PSR-3 logging, the PHP ecosystem, AI slop bug reports, Codeberg’s anti-AI stance, and Laravel Cloud’s scale-to-zero magic.
Fahrenheit, Boiling Rocks, and Byte-Ordering Dates

The show opened with Joe admitting he jumbles her hours, minutes, and seconds — and getting mocked by Europeans for a cache-control header PR on the PHP website. That kicked off a tangent about how the American month-day-year ordering is, as Sara put it, “middle-endian” nonsense that makes no sense as a byte ordering.
From there the crew tumbled down a rabbit hole of measurement units. Joe planted his flag on Fahrenheit as the human-centered temperature scale, while Sara argued that if you stop being “speciesist” about it, water-based Celsius wins. The debate somehow escalated into whether rocks boil, with Google eventually schooling everyone that molten rock vaporizes north of 3,000°C (5,400°F), and a callback to British “stones” as boomer energy nobody younger than half a century actually uses.
Proper Logging with PSR-3

Joe walked through Marco Pivetta’s blog post on proper logging with PSR-3, praising it as a great write-up on injecting loggers via dependency injection and the “some logs are better than no logs” philosophy. A common trap Marco calls out: apps stuffed with beautifully descriptive info-level logs that nobody ever sees because production never runs in info mode.
The big selling point of sticking to a PSR-3-compatible interface is minimal dependencies — instead of pulling in three or four packages and wiring up a pile of configuration, the upstream decisions are already made for you. Holly pushed back on the ergonomics of `$this->logger->error()` feeling heavy for every log call, which spun off a delightfully unhinged RFC pitch: built-in emoji functions where the emoji logs an error and logs a panic.
The Ecosystem Is Why People Stay

The hosts pushed back on the recurring “PHP needs feature X because language Y has it” argument. Sara’s take: if another language is genuinely the better tool, nothing stops you from using it — and revamping PHP’s onboarding process is a far better way to attract newcomers than chasing features would-be developers may never even use.
Holly cut to what everyone had glossed over: the ecosystem. You can write Swift on the server with V***r, but you won’t have the libraries. Whatever you need in PHP, it already exists. A listener even pointed Joe at Brent Roose’s Tempest framework mid-stream to solve a code-highlighting problem on his blog. That gravitational pull of “whatever you need, it’s here” is what keeps people in the PHP orbit.
AI, Layoffs, and Graybeards

Sparked by Gemma’s blog post “Infrastructure and Other Paradoxes” — where an LLM cheerfully suggested folding four brand-new tools (Terraform, Nix, NixOS, Guix) into a team that’s expert in none of them — the crew dug into where AI helps and where it hurts. The consensus: AI is a force multiplier for research and analysis, but it can’t replace the human judgment of knowing what *not* to ship.
Joe brought up an Inc.com article claiming 55% of leadership now regret their major layoffs, with companies like Ford rehiring graybeards because nobody left knew how the software worked. Holly noted this cycle isn’t new, just operating at a terrifying new scale, and Sara emphasized that AI accelerates shipping crap just as easily as it accelerates shipping good work — you still have to fundamentally understand the changes you’re applying.
Codeberg’s Anti-AI Stance & the Slop Bug Report Problem

Holly introduced Codeberg — the nonprofit, community-led GitHub alternative built on Forgejo — and its new policy banning AI/vibe-coded contributions, including a clause flagging work disproportionate to a project’s contributor count. The hosts respected the position but worried it might spell the end of Codeberg, since experienced open-source folks lean on AI tooling (like partner CodeRabbit and traditional static analyzers) as force multipliers.
That led into Sara’s frustration with AI-generated security slop. Daniel Stenberg shut down Curl’s bug bounty program over reports where someone’s own test program deliberately creates RCEs and blames Curl. The fix, Sara argued, is a one-paragraph “elevator pitch” summary — and a plea to maintainers to mark every slop report as spam so GitHub eventually bans the account. The group riffed on adversarial AI (two Claude contexts checking each other, like Apple Intelligence verifying sports-game summaries) as a defensive triage layer, while acknowledging people are simply too dumb to run “double-check this before submitting.”
Laracon: Laravel Cloud Scale-to-Zero

Eric was off at Laracon, which meant peak morale at PHP Architect. The coolest announcement, in Joe’s view, was Laravel Cloud’s scale-to-zero: your entire stack — app server, Valkey, and MySQL — can scale down to nothing when idle and spin back up in under 500 milliseconds on the next request. That’s a potential game-changer for side projects with bursty, uneven traffic and no DevOps army.
Holly and Sara were skeptical about how you cold-start a MySQL instance that fast — almost certainly a pause/resume rather than a true cold start. Other Laracon news: a Laravel language server protocol for better autocomplete and code navigation, plus managed queues that also scale to zero and only wake when a job needs firing.
Links from the show:

PHP Tek 2027 — Chicago, April 27–29, CFP open through end of August
Join us live in Discord
PHP Arch Swag Store
Proper logging in PHP with PSR-3
Codeberg — Software development, but free
Tempest by Brent Roose
infraslopture and other paradoxes
companies regret laying off humans for AI

Hosts:
Joe Ferguson

Mastodon: @phpc.social
PHPArch.me:

Sara Golemon

Mastodon: @phpc.social

Holly Schilling

Mastodon: @tech.lgbt

Streams:

Youtube Channel
Twitch

Connect & Hire

PHP Architect Website

Twitter/X

Mastodon

Hire PHP Developers

Looking to hire PHP developers? Email [email protected] – the team is available for consulting, infrastructure work, and code review.
Partner
This podcast is made a little better thanks to our partners
Displace


Infrastructure Management, Simplified

Automate Kubernetes deployments across any cloud provider or bare metal with a single command. Deploy, manage, and scale your infrastructure with ease.

https://displace.tech/


OurCVEs

Your security posture, on autopilot with OurCVEs

CodeRabbit


Cut code review time & bugs in half instantly with CodeRabbit.


PHP Architect Consulting


Your PHP codebase deserves a partner, not a contractor

PHP Architect provides long-term technical partnerships for organizations that need senior-level PHP expertise that you can depend on.

https://www.phparch.com/consulting/


Music Provided by Epidemic Sound
https://www.epidemicsound.com/
Join Us Live Next Week
Youtube Channel

Got feedback? Join us on Discord at discord.phparch.com
The post The PHP Podcast 2026.07.30 appeared first on PHP Architect.

https://www.phparch.com/podcast/the-php-podcast-2026-07-30/

A Card Counter Mindset Summertime and the living is easy…or so they say. July has us fully immersed in the summer season...
07/25/2026

A Card Counter Mindset
Summertime and the living is easy…or so they say. July has us fully immersed in the summer season, which is proving to be a hot one for most. Making it the perfect time to find a cool spot in the shade (or air conditioning) and read the July issue. Let’s get started with a preview of what you’ll find in this month’s PHP Architect.
The post A Card Counter Mindset appeared first on PHP Architect.

https://www.phparch.com/magazine/2026/07/2026-07-a-card-counter-mindset/

The PHP Podcast 2026.07.23 PHP Podcast – July 23, 2026Hosts: Joe Ferguson, Sara Golemon, and Holly SchillingEric got ous...
07/24/2026

The PHP Podcast 2026.07.23
PHP Podcast – July 23, 2026
Hosts: Joe Ferguson, Sara Golemon, and Holly Schilling
Eric got ousted from his own show (no pants required), Holly’s elephants are lost somewhere in the U.S., and the crew talks SIMD, PHP 8.6 feature freeze, and whether AI can actually create. Also, socks.
A Show Without Pants: The Guest Takeover

This week Eric got booted from his own podcast while John was off doing something more important, leaving Holly, Sara, and Producer Joe to run the show. The gang wasted no time reminding everyone that the correct Discord URL is discord.phparch.com — not phparch.com/discord — a mistake that ended up as tomorrow’s task list item for Joe.
There was plenty of housekeeping to get through: PHP Tek 2027 lands April 27th through 29th in Chicago, the CFP is open, and the call for papers closes August 31st. Holly, ever the deadline enthusiast, admitted she loves “the sound deadlines make as they whoosh by,” which set the tone for much of the episode.
And yes, the swag store now has PHP Architect socks. There was extensive debate about whether the socks are safe for large-footed individuals, whether banana-for-scale photos are needed, and whether Eric should post feet pics. DuckNizzle bought some socks. We are also, apparently, SOC 2 certified.
The Great Elephant Migration

Sara’s elephant herd is currently scattered across the United States, most of them somewhere between Chicago and California courtesy of U-Haul. With import forms to Portugal not yet ready, the plush pachyderms are taking a scenic detour west before eventually making their way overseas.
Only six elephants are currently on hand, and technically none of them are PHP Architect elephants — though one is a PHP Roundtable elephant, prompting the recurring wish that someone should bring that podcast back. Spoiler: they might, more on that later.
Sara also shared she’s been in intensive foreign language classes every day, getting up at 7 a.m. while not falling asleep until 2 a.m., all while assembling a Prusa Core One+ 3D printer kit with roughly 300 pages of instructions and hundreds of tiny pieces.
SIMD and Data Science in PHP

Joe brought a blog post from Mitchell Hashimoto arguing that everyone should know SIMD — Single Instruction, Multiple Data. It’s a form of parallel computing that can dramatically speed up large data processing, offering 8x, 10x, even 100x improvements when you’re working with hundreds of thousands or millions of records. It won’t help you loop over a 100-item array, but it might supercharge a FlowPHP parquet file with millions of rows.
Sara pushed back on how deep into the processor this discussion goes, noting that floating point math already flows through the SIMD registers — so in a very narrow sense, you’re already getting SIMD support in current PHP. Reordering instructions safely is another matter entirely (see: Intel’s history of getting it wrong).
The conversation tied back to Florian Englehart’s “One Billion Rows” talk at PHP Tek 2025, and Holly mentioned her monomorphic generics work now supports variadic types — meaning a typed vector structure could, with a bit of JIT work, make SIMD-style patterns possible in PHP’s near future.
PHP 8.6 Feature Freeze Is Coming

Code freeze for PHP 8.6 lands August 11th — less than three weeks out. The release managers admitted they flubbed and missed the five-week warning email that should have gone out July 6th, though the four-week email did go out July 13th and a two-week warning is coming next Monday.
Sara, one of PHP’s previous release managers, was philosophical about people panicking at the deadline: you’ve had twelve months, your lack of planning is not the release team’s problem. An idea to move the feature freeze date was floated and quickly shot down — the cadence has been established for years, and one missed email doesn’t change that.
Larry got a shout-out for suggesting internals push all new business to September so 8.6 can get properly tested. And Holly declared, in full Benevolent Dictator mode, that the next release simply has to be 9.0 — too many big features to ship for a mere 8.7.
AI, Copyright, and Whether Machines Can Create

The crew dug into AI, starting with the news that a judge approved Anthropic’s $1.5 billion copyright lawsuit settlement — with roughly two-thirds going to lawyers. On the brighter side, Anthropic is giving a million dollars to Code Crew, a Memphis nonprofit building a physical location to offer less-predatory career training.
Holly described using AI to implement a new module dereference operator (colon greater-than) that exists nowhere but her own machine, arguing the AI isn’t stealing when it follows precise instructions to generate novel syntax. Sara countered that the LLM isn’t creating so much as blending existing functionality — following...

Community Corner Podcast: Firefly III with James Cole In this episode, Scott talks with James Cole, creator of Firefly I...
07/23/2026

Community Corner Podcast: Firefly III with James Cole
In this episode, Scott talks with James Cole, creator of Firefly III, an open source personal finance manager. James explains why he built Firefly III after graduating college with student debt, how the rule engine automates transaction categorization, importing bank data with CSV files and third-party connectors like enable banking and GoCardless, and how to get started without importing years of history.
Links:

Our Discord – https://discord.gg/aMTxunVx
Buy our shirts – https://store.phparch.com/products/community-corner-podcast-t-shirt

James’s Links:

Firefly III – https://www.firefly-iii.org/

Scott’s Links:

Website – https://scott.keck-warren.com/
Bluesky – https://bsky.app/profile/scottkeckwarren.bsky.social
LinkedIn – https://www.linkedin.com/in/scott-keck-warren-91689810/
Mastodon – https://phpc.social/

PHP Architect Social Media:

X: https://x.com/phparch
Mastodon: https://phparch.social/
Bluesky: https://bsky.app/profile/phparch.com
Discord: https://discord.phparch.com

Subscribe to our magazine: https://www.phparch.com/subscribe/
Partners
This podcast is made a little better thanks to our partners.
Displace
Infrastructure Management, Simplified

Automate Kubernetes deployments across any cloud provider or bare metal with a single command. Deploy, manage, and scale your infrastructure with ease.

https://displace.tech/
PHPScore
Put Your Technical Debt on Autopay with PHPScore

https://phpscore.com/
CodeRabit
CodeRabbit – Cut code review time & bugs in half instantly with CodeRabbit.

https://www.coderabbit.ai/
Music Provided by Epidemic Sound https://www.epidemicsound.com/

The post Community Corner Podcast: Firefly III with James Cole appeared first on PHP Architect.

https://www.phparch.com/podcast/community-corner-podcast-firefly-iii-with-james-cole/

Ship Code Safely with Laravel Pennant Feature Flags Deploying new features used to mean holding your breath. You merged ...
07/22/2026

Ship Code Safely with Laravel Pennant Feature Flags
Deploying new features used to mean holding your breath. You merged the branch, pushed to production, and hoped the QA process caught everything. If it didn’t, rollback meant either reverting a deployment or shipping a hotfix under pressure. Feature flags change that story entirely, and Laravel Pennant gives you a first-party, well-designed way to build them directly into your application.
Pennant has been part of the Laravel ecosystem since Laravel 10, and with Laravel 12 it has matured into something you should be reaching for as a default pattern rather than a special-case tool. If you have not made it part of your workflow yet, this is a good time to start.
What Pennant Actually Does
At its simplest, a feature flag is a conditional check that lets you turn a block of functionality on or off without deploying new code. Pennant takes that concept and gives it a clean API, persistent storage, per-user scoping, and enough flexibility to cover the patterns you will actually need in production: gradual rollouts, A/B tests, beta access, and premium feature gating.
Install it with Composer and run the migration:
composer require laravel/pennant
php artisan migrate
Pennant creates a single features table. Every resolved flag for every user (or other model) is stored as a row, which means the system is stateful: once a user is assigned to the “on” side of a flag, they stay there across requests.
Defining Features
Feature definitions live in your AppServiceProvider, or in a dedicated FeaturesServiceProvider if your flag count grows. The Feature::define() call accepts a closure that returns a boolean deciding whether the feature is active for the current scope.
use Laravel\Pennant\Feature;

Feature::define('new-checkout', fn (User $user): bool =>
$user->created_at->isAfter(now()->subDays(30))
);
This definition activates the new checkout flow only for users who registered in the last 30 days. Every other user continues to see the old flow. The closure receives the scope (usually a User model, but any model works) and returns a bool.
For a simpler flag with no user-based logic, return a static value or pull from an environment variable:
Feature::define('maintenance-banner', fn (): bool =>
(bool) config('features.maintenance_banner', false)
);
Checking Flags in Your Application
Checking whether a feature is active is one method call:
if (Feature::active('new-checkout')) {
return redirect()->route('checkout.v2');
}
When you call this without specifying a scope, Pennant uses the currently authenticated user as the scope automatically. You can be explicit about the scope when needed:
Feature::for($user)->active('new-checkout')
In Blade templates, the directive keeps your views readable:
('new-checkout')




For route-level protection, Pennant ships with a EnsureFeaturesAreActive middleware you can apply directly:
Route::middleware(['auth', EnsureFeaturesAreActive::using('new-checkout')])
->group(function () {
Route::get('/checkout', CheckoutV2Controller::class);
});
Gradual Rollouts
One of the most practical patterns Pennant supports is percentage-based rollouts. Rather than flipping a feature on for everyone at once, you activate it for a growing slice of your user base.
use Laravel\Pennant\Feature;
use Illuminate\Support\Lottery;

Feature::define('new-search', function (User $user): bool {
return Lottery::odds(1, 10)->winner(
fn () => true,
fn () => false,
)->choose();
});
The Lottery class ships with Laravel. The odds above activate the feature for roughly 10% of users. Because Pennant stores the resolved value in the database after the first check, a user who lands in the 10% stays there for all subsequent requests. This is what you want: consistent experience within a session and across sessions, not a re-roll on every page load.
To move from 10% to 50% to 100%, you update the odds and call Feature::forget('new-search') to reset stored values, or use Feature::activate('new-search') to mass-activate for all users when you are ready to ship to everyone.
A/B Testing with Pennant
A/B testing is a natural extension of the gradual rollout pattern. Instead of returning a bool, return a string variant:
Feature::define('pricing-page', function (User $user): string {
return Lottery::odds(1, 2)->winner(
fn () => 'pricing-v2',
fn () => 'pricing-v1',
)->choose();
});
Check the variant in your controller:
$variant = Feature::value('pricing-page');

return view("pricing.{$variant}");
Pennant fires a Laravel\Pennant\Events\FeatureChecked event every time a flag is resolved. Hook into that event to send the variant assignment to your analytics pipeline without cluttering your... https://www.phparch.com/2026/07/19602/

Tempest 3.0: The PHP Framework That Gets Out of Your Way If you spend most of your PHP time in Laravel or Symfony, you m...
07/20/2026

Tempest 3.0: The PHP Framework That Gets Out of Your Way
If you spend most of your PHP time in Laravel or Symfony, you may have noticed a framework quietly picking up momentum over the past couple of years. Tempest describes itself as “the PHP framework that gets out of your way,” and after spending time with version 3.0 — released February 12, 2026 — that description feels earned. It is opinionated in the best sense: it makes choices so you do not have to, surfaces errors clearly, and does not ask you to write boilerplate to tell it things it can figure out on its own.
Tempest 3.0 is not a minor release. It requires PHP 8.5, ships a rewritten exception handler, a faster ORM, modern CSRF protection, closure-based validation, and an automated upgrade path using Rector. If you have been watching from the sidelines, this release is a good reason to give it a serious look.
The Discovery System: The Core Idea
Before digging into what is new in 3.0, it is worth understanding what makes Tempest structurally different from frameworks you already know. Tempest’s central concept is discovery: the framework scans your codebase and automatically registers routes, console commands, view components, event listeners, and middleware without requiring any manual registration.
In Laravel, you register a route in routes/web.php. In Symfony, you configure route attributes, and then the router still needs to know where to scan. In Tempest, you put a route attribute on a controller method and it is discovered automatically. The same applies to console commands, event handlers, and middleware. There is no service provider, no boot() method, no register() call. The framework finds the things.
use Tempest\Router\Get;
use Tempest\Router\Response;
use Tempest\Router\Responses\Ok;

final class BookController
{
#[Get('/books/{id}')]
public function show(int $id): Response
{
$book = Book::find($id);
return new Ok($book);
}
}
That is the entire route definition. No route file. No service provider. Drop the file in your project and Tempest picks it up. This is the philosophical heart of the framework, and everything else builds on it.
PHP 8.5 Only: A Deliberate Statement
Tempest 3.0 drops support for all PHP versions below 8.5. This is a pattern the project has followed since the start: each major release tracks the latest PHP version and drops everything older. The maintainer, Brent Roose, has written extensively about why he believes OSS maintainers have a responsibility to push the PHP community forward rather than maintain broad compatibility that incentivizes running outdated runtimes.
In practice, this means Tempest gets to use the newest language features without polyfills or conditional compatibility shims. Closure-based validation (see below) is possible precisely because Tempest did not have to support PHP 8.4. If you are running PHP 8.5 in production already, this is a net positive.
New Exception Handler
Tempest has relied on Whoops since its earliest days. Whoops is solid, but it was always a stand-in for something more native to the framework. Version 3.0 ships a ground-up replacement: a custom exception renderer built to fit Tempest’s visual identity and designed to be extended over time.
The new handler shows the exception class name, the message, a code snippet of the throw site with highlighted line, the full stack trace with source context, and HTTP context for web exceptions. The visual presentation is cleaner and better integrated with the Tempest development environment than Whoops ever was. The maintainers have explicitly stated this is a starting point, not a final product, and they plan to extend it with deeper debugging capabilities in the 3.x cycle.
Modernized CSRF Protection
This one is worth calling out because it represents a genuine design shift. Tempest 3.0 removes the classic token-based CSRF approach (and the template tag that came with it) and replaces it with header-based verification using Sec-Fetch-Site and Sec-Fetch-Mode.
These HTTP headers are automatically set by modern browsers and indicate the origin of a request. A same-origin fetch has Sec-Fetch-Site: same-origin. A cross-origin form submission from a malicious page has Sec-Fetch-Site: cross-site. The framework validates these headers server-side instead of requiring a hidden token in every form.
The practical effect: you remove from your forms. Tempest handles the protection without client-side state. The approach is well-supported across modern browsers (Chromium, Firefox, Safari) and sidesteps the token synchronization issues that crop up in single-page apps and multi-tab sessions.
Faster ORM and Database Improvements
The Tempest ORM received targeted performance work in 3.0. Benchmarks from the release notes show significant improvement in query... https://www.phparch.com/2026/07/tempest-3-0-the-php-framework-that-gets-out-of-your-way/

Introduction to Loop Engineering: Building AI Agents That Run Themselves Video version https://youtu.be/pxnY6T98G14You m...
07/18/2026

Introduction to Loop Engineering: Building AI Agents That Run Themselves
Video version https://youtu.be/pxnY6T98G14
You may not realize it, but most developers today sit at their keyboards running a manual while loop without realizing it. You write a prompt, read the response, decide what to ask next, and repeat, over and over again. All day long, you are the thing that keeps the process moving toward the goal. When you step away to grab coffee or answer a Slack message, the loop stops because you’re not driving it forward.
Loop engineering moves that while loop out of your head and into code. Instead of you nudging the agent forward one turn at a time, the agent iterates on its own: it acts, observes the result, reasons about what happened, and repeats until the goal is met.
Boris Cherny at Anthropic put it plainly: “I don’t prompt Claude anymore. I have loops running that prompt Claude.”
In this article, we’ll cover where loop engineering is, the five building blocks that make it work, the three loop types organized by how long they run, the commands that ship in tools like Claude Code today, and the gotchas that will cost you money and sanity if you ignore them.
Where This Came From
The idea started as a joke that turned out to be serious. In mid-2025, Geoffrey Huntley coined the “Ralph Wiggum method”: a bash loop that does nothing fancier than continuously nudge an agent back toward its objective. You “just” wrap your agent in a while loop, feed it the same goal on every pass, and let it grind. Crude, but it worked well enough that people paid attention.
By spring of 2026, the major platforms had turned that pattern into a first-class feature. Codex created Goals while Claude Code shipped a /goal command in May. What started as a shell script became a supported command.
“Loop engineering” has been called a hot buzzphrase right now, but the concept underneath is real and worth understanding. So let’s ignore the branding and focus on the substance.
This is still a relatively new concept, so this article might be out of date before we even publish it.
The Five Building Blocks
Again, this is brand new, so a lot of these concepts are in flux, but a working loop setup can be broken into five components.
Automations are scheduled discovery tasks. You can think of this as a daily or weekly triage run, or an agent that analyzes every CI failure the moment it happens. Nobody kicks these off; they fire on a timer or on an event. My favorite example is to grab all the errors from our logs and then create issues for them so we can triage the results (or just pass them on if they’re an exception).
Git Worktrees are separate working directories so multiple agents can run in parallel without stepping on each other’s files. If you’ve ever had two processes fight over the same file, you understand why this matters. Essentially, each agent gets its own sandbox.
Skills are reusable project context stored in SKILL.md files. They codify the knowledge an agent needs about your project so you stop re-explaining the same conventions and processes on every run. The gap between what you meant and what the agent understood is sometimes referred to as “intent debt”, and skills are how you reduce it.
Plugins and connectors use MCP to link agents to the tools you already use like your ticketing system, chat, and your database. The agent stops being trapped in a text box and starts touching real systems so you can better interact with it.
Sub-agents split the work across separate agents, one for ideation and one for verification. Using a different agent to check the work guards against a single model believing its own bad ideas.
Three Loops, Three Timescales
The clearest way to organize loops is by how long they run.
Fast loops take minutes and generally involve a retry loop around an atomic task with a clear pass or fail signal. “Make these tests pass” is the classic example. The agent runs the tests, reads the failures, edits the code, and runs again until green.
Medium loops take hours and follow a plan-execute-verify rhythm for multi-step work. Examples of this involve refactoring a module or adding a feature. An engineer can point a medium loop at a suite of flaky tests and create 13 pull requests on its own, each one stabilizing a different test.
Finally, slow loops run for days or weeks and often react to events. For example, converted a PHP app to a PHP Native app on 30-minute cycles, letting the loop chew through the conversion while you do other things. Another common pattern is nightly end-to-end tests that attempt their own fixes before anyone arrives in the morning, so you walk in to green builds instead of red ones.
We’ll have more after this word from our partners.
The Commands
The tooling is catching up, and most of it groups into a few commands.
The /goal command sets a persistent objective...

Claude Code Subagents: Delegate Like a Senior PHP Developer If you’ve been using Claude Code as a single monolithic assi...
07/17/2026

Claude Code Subagents: Delegate Like a Senior PHP Developer
If you’ve been using Claude Code as a single monolithic assistant, you’ve only been using half the tool. Subagents — specialized AI assistants that Claude Code can spin up and delegate tasks to — fundamentally change how you work. Instead of context-switching between “write this Pest test,” “optimize that MySQL query,” and “review this Rector config” in one crowded conversation, you build a team: each agent focused, each carrying only the context it needs.
Think of it the way a senior engineer thinks about team structure. You don’t want one person context-switching between database architecture, frontend JavaScript, and deployment pipelines. You assign specialists. Claude Code subagents are the same idea, and as of 2026 they’re production-ready and genuinely useful for PHP development workflows.
What a Subagent Actually Is
A subagent is a Markdown file with YAML frontmatter that defines a specialized AI persona. It has its own system prompt, its own tool access, and runs in its own context window. When Claude Code delegates to it, the subagent doesn’t inherit the history of your main conversation — it gets a clean context scoped to its task. This is important: it means the subagent can go deep on a problem without the parent agent’s noise, and it can run in parallel with other subagents.
Subagents live in one of two places:

~/.claude/agents/ — global, available in every projectclaude/agents/ — project-local, only active in that directory

The file format is straightforward:
---
name: php-pro
description: Senior PHP 8.5 developer. Use for strict-typed code, PSR compliance, performance analysis, and modern PHP idioms.
model: claude-sonnet-4-5
tools:
- Read
- Write
- Edit
- Bash
---

You are a senior PHP developer with deep expertise in PHP 8.5+, strict typing, and the modern PHP ecosystem. You default to `declare(strict_types=1)`, use typed properties, union types, match expressions, fibers, and readonly classes where appropriate. You follow PSR-1, PSR-2, PSR-4, PSR-12, and PSR-7. You write code as if it will be reviewed by an expert who has no patience for anything loose.
That’s the whole thing. Claude Code reads the description field to decide when to invoke the agent — so write it like a docblock, specific and actionable.
The php-pro Subagent and the Awesome Collection
You don’t have to build every subagent from scratch. The awesome-claude-code-subagents repository on GitHub currently contains over 100 specialist agents covering language specialists, framework experts, testing agents, DevOps helpers, and more. The php-pro agent in the categories/02-language-specialists/ directory is a good baseline for PHP work — it’s preconfigured to understand Laravel and Symfony conventions, strict typing requirements, and modern async patterns.
Installing it is a simple file copy:
# Install globally (available in all projects)
mkdir -p ~/.claude/agents
curl -sO https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/02-language-specialists/php-pro.md
mv php-pro.md ~/.claude/agents/

# Or install project-locally
mkdir -p .claude/agents
cp php-pro.md .claude/agents/
Once installed, you can invoke it explicitly in Claude Code with -pro or let Claude route to it automatically based on context.
Building a Laravel-Specific Agent
The real power is in agents tuned to your specific stack. Here’s a minimal Laravel agent that focuses on Eloquent, queues, and service architecture:
---
name: laravel-architect
description: Use for Laravel 12 architecture questions, Eloquent modeling, queue design, service layer patterns, and Artisan command creation.
model: claude-sonnet-4-5
tools:
- Read
- Write
- Edit
- Bash
---

You are a Laravel 12 expert. You design service classes with constructor injection, keep controllers thin, and use Form Requests for validation. You use Eloquent relationships deliberately and avoid N+1 queries by defaulting to eager loading. For queues, you prefer chunked dispatching and know the `Bus::batch()` patterns. You write Artisan commands that are testable and report progress with `$this->withProgressBar()`. When in doubt, you check the Laravel docs before assuming.
Save that to .claude/agents/laravel-architect.md in your project root and you have a routing layer between your main Claude conversation and deep Laravel-specific work.
Parallel Ex*****on: The Real Productivity Win
The reason to think in subagents isn’t just organization — it’s concurrency. Claude Code can dispatch multiple subagents simultaneously. This matters when you have independent tasks: generating a migration, writing a test suite for an existing controller, and auditing a query for index coverage are all independent. In a single-agent session, you do them sequentially. With...

Address

San Diego, CA

Alerts

Be the first to know and let us send you an email when PHP Architect posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to PHP Architect:

Shortcuts

Share