Forgotten Drupal site still runs after 8 years. No updates. No errors.
https://rulr.dev/blog/forgotten-drupal-site
https://redd.it/1m6cvxy
@r_php
https://rulr.dev/blog/forgotten-drupal-site
https://redd.it/1m6cvxy
@r_php
rulr.dev
How an 8-Year-Old Drupal Site Outsmarted the Hype | Rulr Dev Services
A trip through dev trends, forgotten servers, and the surprise of real-world resilience.
What are your top myths about PHP?
Hey folks!
I’m working on a series of articles about the most common myths surrounding different programming languages.
Would love to hear your favorite myths or misconceptions — drop them below
https://redd.it/1m6c6s7
@r_php
Hey folks!
I’m working on a series of articles about the most common myths surrounding different programming languages.
Would love to hear your favorite myths or misconceptions — drop them below
https://redd.it/1m6c6s7
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Why don't we break switch cases by default?
Before anything else: This isn't me calling for a revolt, a change, or this being considered a bug or flaw. Neither am I trying to make a case (ha!). I have no issue with how it is, I'm asking out of curiosity. Nothing more :)
I wrote a switch block today. You know, ... switch, case, the action you want to perform, break, ... hm... "break"…? I mean, I know, otherwise it would continue to the next step. I don't think I ever wrote a switch block with breaks exclusively. Not sure if I've ever seen code that was different, though that might just be me not having paid attention or the kind of code I usually deal with. Am I an outlier here, is my perception warped? Why is it this way around, having to explicitly break instead of that being the default?
I may overlook something obvious, something hidden, something historic, ... I can speculate as much as I want, but if somebody actually knows, I'd be interested.
https://redd.it/1m6fnc9
@r_php
Before anything else: This isn't me calling for a revolt, a change, or this being considered a bug or flaw. Neither am I trying to make a case (ha!). I have no issue with how it is, I'm asking out of curiosity. Nothing more :)
I wrote a switch block today. You know, ... switch, case, the action you want to perform, break, ... hm... "break"…? I mean, I know, otherwise it would continue to the next step. I don't think I ever wrote a switch block with breaks exclusively. Not sure if I've ever seen code that was different, though that might just be me not having paid attention or the kind of code I usually deal with. Am I an outlier here, is my perception warped? Why is it this way around, having to explicitly break instead of that being the default?
I may overlook something obvious, something hidden, something historic, ... I can speculate as much as I want, but if somebody actually knows, I'd be interested.
https://redd.it/1m6fnc9
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
PHP the right way, but for testing ?
Hey everyone!
I recently changed companies, and for the first time in my life, I’m seeing what proper, professional use of tests looks like. I’m realizing every day just how weak my understanding of testing has been all along…
I really need to rebuild (or maybe build from scratch) my foundation and then work on advancing my knowledge from there.
Do you know of any great resources that cover the fundamentals of testing, especially in the context of PHP?
P.s. everything
https://redd.it/1m6hhy2
@r_php
Hey everyone!
I recently changed companies, and for the first time in my life, I’m seeing what proper, professional use of tests looks like. I’m realizing every day just how weak my understanding of testing has been all along…
I really need to rebuild (or maybe build from scratch) my foundation and then work on advancing my knowledge from there.
Do you know of any great resources that cover the fundamentals of testing, especially in the context of PHP?
P.s. everything
https://redd.it/1m6hhy2
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How to Test Laravel Socialite Endpoints
https://nabilhassen.com/how-to-test-laravel-socialite
https://redd.it/1m6hgpy
@r_php
https://nabilhassen.com/how-to-test-laravel-socialite
https://redd.it/1m6hgpy
@r_php
Nabilhassen
How to Test Laravel Socialite
Learn how to implement & test Laravel Socialite logins, handle edge cases like duplicate emails, and mock providers to ensure full authentication coverage.
Turn YouTube videos into an audio-only RSS podcast
https://www.youtube.com/watch?v=H_qmL0x_20s
https://redd.it/1m6o7ub
@r_php
https://www.youtube.com/watch?v=H_qmL0x_20s
https://redd.it/1m6o7ub
@r_php
YouTube
Downloading YouTube videos
I automate the entire process of turning YouTube videos into podcast episodes using Laravel, yt-dlp, and the Transistor.fm API. From fetching videos to extracting audio and publishing drafts, we automate it all. Whether you're a Laravel dev or just love seeing…
Whats the best place to host a simple PHP website?
New to PHP and coming from Ruby on Rails, Python, and Next.js. I've used Vercel before, I've heard of Hertzner, but I'm looking for a free way to deploy a very simple, almost static PHP website and wondering what people use.
https://redd.it/1m6rrlc
@r_php
New to PHP and coming from Ruby on Rails, Python, and Next.js. I've used Vercel before, I've heard of Hertzner, but I'm looking for a free way to deploy a very simple, almost static PHP website and wondering what people use.
https://redd.it/1m6rrlc
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
What are some unusual coding style preferences you have?
For me, it's the ternary operators order.
Most resources online write it like this...
$test > 0 ?
'foo' :
'bar';
...but it always confuses me and I always write it like this:
$test > 0
? 'foo'
: 'bar';
I feel like it is easier to see right away what the possible result is, and it always takes me a bit more time if it is done the way I described it in the first example.
https://redd.it/1m73bzn
@r_php
For me, it's the ternary operators order.
Most resources online write it like this...
$test > 0 ?
'foo' :
'bar';
...but it always confuses me and I always write it like this:
$test > 0
? 'foo'
: 'bar';
I feel like it is easier to see right away what the possible result is, and it always takes me a bit more time if it is done the way I described it in the first example.
https://redd.it/1m73bzn
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
New in PHP 8.5: The Pipe Operator
https://chrastecky.dev/programming/new-in-php-8-5-the-pipe-operator
https://redd.it/1m73qfi
@r_php
https://chrastecky.dev/programming/new-in-php-8-5-the-pipe-operator
https://redd.it/1m73qfi
@r_php
Built a PHP framework that plays nice with legacy code - hope someone finds it useful
I've been working on a PHP framework called Canvas that I think solves a real problem many of us face: how do you modernize old PHP applications without breaking everything?
The core idea: Instead of forcing you to rewrite your entire codebase, Canvas uses a "fallthrough" system. It tries to match Canvas routes first, and if nothing matches, it automatically finds your existing PHP files, wraps them in proper HTTP responses, and handles legacy patterns like
## How it works
You create a new bootstrap file (like
Now your existing URLs like
## What you get immediately
- ObjectQuel ORM - A readable query syntax inspired by QUEL
- Annotation-based routing
- Dependency injection
- Built-in validation and sanitization
- Visual debug bar with query analysis
- Task scheduling
But here's the key part: you can start using Canvas services in your existing legacy files right away:
## Why I built this
This framework grew out of real pain points I've experienced over 20+ years. I've been running my own business since the early 2000s, and more recently had an e-commerce job where I was tasked with modernizing a massive legacy spaghetti codebase.
I got tired of seeing "modernization" projects that meant rewriting everything from scratch and inevitably getting abandoned halfway through. The business reality is that most of us are maintaining applications that work and generate revenue - they just need gradual improvement, not a risky complete overhaul that could break everything.
The framework is MIT licensed and available on GitHub: https://github.com/quellabs/canvas. I hope someone else finds this approach useful for their own legacy PHP applications.
https://redd.it/1m75j9a
@r_php
I've been working on a PHP framework called Canvas that I think solves a real problem many of us face: how do you modernize old PHP applications without breaking everything?
The core idea: Instead of forcing you to rewrite your entire codebase, Canvas uses a "fallthrough" system. It tries to match Canvas routes first, and if nothing matches, it automatically finds your existing PHP files, wraps them in proper HTTP responses, and handles legacy patterns like
exit() and die() calls gracefully.## How it works
You create a new bootstrap file (like
public/index.php) while keeping your existing structure:<?php
use Quellabs\Canvas\Kernel;
use Symfony\Component\HttpFoundation\Request;
require_once __DIR__ . '/../vendor/autoload.php';
$kernel = new Kernel([
'legacy_enabled' => true,
'legacy_path' => __DIR__ . '/../'
]);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
Now your existing URLs like
/users.php or /admin/dashboard.php continue working exactly as before, but you can start writing new features using modern patterns:class UserController extends BaseController {
/**
* @Route("/api/users/{id:int}")
*/
public function getUser(int $id) {
return $this->json($this->em->find(User::class, $id));
}
}
## What you get immediately
- ObjectQuel ORM - A readable query syntax inspired by QUEL
- Annotation-based routing
- Dependency injection
- Built-in validation and sanitization
- Visual debug bar with query analysis
- Task scheduling
But here's the key part: you can start using Canvas services in your existing legacy files right away:
// In your existing users.php file
$em = canvas('EntityManager');
$users = $em->executeQuery("
range of u is App\\Entity\\User
retrieve (u) where u.active = true
sort by u.createdAt desc
");
## Why I built this
This framework grew out of real pain points I've experienced over 20+ years. I've been running my own business since the early 2000s, and more recently had an e-commerce job where I was tasked with modernizing a massive legacy spaghetti codebase.
I got tired of seeing "modernization" projects that meant rewriting everything from scratch and inevitably getting abandoned halfway through. The business reality is that most of us are maintaining applications that work and generate revenue - they just need gradual improvement, not a risky complete overhaul that could break everything.
The framework is MIT licensed and available on GitHub: https://github.com/quellabs/canvas. I hope someone else finds this approach useful for their own legacy PHP applications.
https://redd.it/1m75j9a
@r_php
GitHub
GitHub - quellabs/canvas: Modern PHP framework with annotation routing, ObjectQuel ORM, and legacy integration. Modernize existing…
Modern PHP framework with annotation routing, ObjectQuel ORM, and legacy integration. Modernize existing PHP apps incrementally without breaking what works. - quellabs/canvas
More-Than-One Class Per File: moto/autoload
https://pmjones.io/post/2025/07/23/more-than-one-class-per-file/
https://redd.it/1m78ww6
@r_php
https://pmjones.io/post/2025/07/23/more-than-one-class-per-file/
https://redd.it/1m78ww6
@r_php
PHP learning material for beginners
Hello, guys, I want to start learning php to be able to build relatively simple web sites with databases, user authentication, cookies etc. I don't strive for becoming php guru, I just want to understand backend basics and server-side processes.
Are there any good beginner-friendly, up-to-date learning material like books or websites with tutorials that cover php, database handling, authentication and other relevant stuff?
I found out about the book "PHP and MySQL web development" by Luke Welling, but the last edition was released in 2016-2017 and I don't know whether it's outdated or not.
Thanks in advance
https://redd.it/1m7czpa
@r_php
Hello, guys, I want to start learning php to be able to build relatively simple web sites with databases, user authentication, cookies etc. I don't strive for becoming php guru, I just want to understand backend basics and server-side processes.
Are there any good beginner-friendly, up-to-date learning material like books or websites with tutorials that cover php, database handling, authentication and other relevant stuff?
I found out about the book "PHP and MySQL web development" by Luke Welling, but the last edition was released in 2016-2017 and I don't know whether it's outdated or not.
Thanks in advance
https://redd.it/1m7czpa
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
🌩️ Cloudflare Tunnel automation noscript for Laravel Herd (with Custom domain + HTTPS)
https://github.com/IamSwap/cftunnel
https://redd.it/1m7ssjc
@r_php
https://github.com/IamSwap/cftunnel
https://redd.it/1m7ssjc
@r_php
GitHub
GitHub - IamSwap/cftunnel: 🌩️ Cloudflare Tunnel automation for Laravel Herd - Share local sites instantly with custom domains
🌩️ Cloudflare Tunnel automation for Laravel Herd - Share local sites instantly with custom domains - IamSwap/cftunnel
Finding Fullstack wannabe community
Now im in the 2nd year of college, lately im on my self-portfolio project. So i wonder if i can find some friends from community where we can share, help, or team up with whom has the same interest to be fullstack dev in future.
https://redd.it/1m7tgkt
@r_php
Now im in the 2nd year of college, lately im on my self-portfolio project. So i wonder if i can find some friends from community where we can share, help, or team up with whom has the same interest to be fullstack dev in future.
https://redd.it/1m7tgkt
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Why can't we unregister a shutdown function?
When I was developing Sword (merging Symfony and Wordpress), I found that Wordpress and several plugins such as WooCommerce register some shutdown functions, which are conflicting with the Symfony profiler.
I tried to make an extension to add a `unregister_shutdown_function()` function but as I understand it, since PHP 8 it's impossible to access the shutdown functions list, therefore no userland extension can implement this feature.
What are the reasons why it's designed to be register-only and closed API?
https://redd.it/1m7zhi9
@r_php
When I was developing Sword (merging Symfony and Wordpress), I found that Wordpress and several plugins such as WooCommerce register some shutdown functions, which are conflicting with the Symfony profiler.
I tried to make an extension to add a `unregister_shutdown_function()` function but as I understand it, since PHP 8 it's impossible to access the shutdown functions list, therefore no userland extension can implement this feature.
What are the reasons why it's designed to be register-only and closed API?
https://redd.it/1m7zhi9
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Is Laravel cloud down for anyone else?
https://status.laravel.com/ isn't showing anything (doesn't even have cloud listed)
But I'm getting an inertia error and can't log in.
Edit, now getting a cloudflare error message showing "Gateway time-out" / cloud.laravel.com Host Error
https://redd.it/1m7zpal
@r_php
https://status.laravel.com/ isn't showing anything (doesn't even have cloud listed)
But I'm getting an inertia error and can't log in.
Edit, now getting a cloudflare error message showing "Gateway time-out" / cloud.laravel.com Host Error
https://redd.it/1m7zpal
@r_php
Symfony Bundle for Elasticsearch
Hello fellow Symfony devs,
This is my first time posting on this subreddit, hopefully I'm doing this right.
I have just released a Symfony bundle that drastically simplifies working with Elasticsearch :
\- Create indexes with just two PHP classes
\- Auto-generate routes for indexing, updating, deleting, and searching documents
\- Provides a full feature search engine (query searching, filtering, aggregations, sortings)
\- Developer-friendly API with zero Elasticsearch knowledge required
\- Built-in validation, filtering, sorting, and aggregations
You can be up and running in minutes, whether via REST endpoints or using provided PHP clients.
The whole thing is also entirely customizable as it works with interfaces. You can create your own elasticsearch components and behavior if you feel the need to and the system will be able to work with it transparently.
You can find this bundle here https://github.com/AdriBalla/symfony-search-bundle with a pretty detailed readme.
I would love feedback from the Symfony community — and contributions are welcome!
Cheers
https://redd.it/1m81v11
@r_php
Hello fellow Symfony devs,
This is my first time posting on this subreddit, hopefully I'm doing this right.
I have just released a Symfony bundle that drastically simplifies working with Elasticsearch :
\- Create indexes with just two PHP classes
\- Auto-generate routes for indexing, updating, deleting, and searching documents
\- Provides a full feature search engine (query searching, filtering, aggregations, sortings)
\- Developer-friendly API with zero Elasticsearch knowledge required
\- Built-in validation, filtering, sorting, and aggregations
You can be up and running in minutes, whether via REST endpoints or using provided PHP clients.
The whole thing is also entirely customizable as it works with interfaces. You can create your own elasticsearch components and behavior if you feel the need to and the system will be able to work with it transparently.
You can find this bundle here https://github.com/AdriBalla/symfony-search-bundle with a pretty detailed readme.
I would love feedback from the Symfony community — and contributions are welcome!
Cheers
https://redd.it/1m81v11
@r_php
GitHub
GitHub - AdriBalla/symfony-search-bundle
Contribute to AdriBalla/symfony-search-bundle development by creating an account on GitHub.
Invision Community Docker (with caddy, frankenphp and valkey socket connected)
http://gitlab.com/greyxor/invision-community-docker
https://redd.it/1m82k1r
@r_php
http://gitlab.com/greyxor/invision-community-docker
https://redd.it/1m82k1r
@r_php
GitLab
GreyXor / Invision Community Docker · GitLab
Dockerized Invision Community 5 stack using Caddy, FrankenPHP, Valkey (Redis fork), and s6-overlay for high performance and minimal overhead.
How to Make Your AI Agent Program PHP and Laravel with Grace and Style
https://spatie.be/blog/how-to-make-your-ai-agent-program-with-grace-and-style
https://redd.it/1m875ov
@r_php
https://spatie.be/blog/how-to-make-your-ai-agent-program-with-grace-and-style
https://redd.it/1m875ov
@r_php
spatie.be
How to Make Your AI Agent Program PHP and Laravel with Grace and Style
We've converted our PHP and Laravel coding guidelines into AI-friendly instructions so Claude Code and other AI agents can generate code that matches our established programming style.
LarAgent v0.5 Preview: Groq API, Audio Modality, and More
https://blog.laragent.ai/laragent-v0-5-preview-groq-api-audio-modality-and-more-configs/
https://redd.it/1m88ksa
@r_php
https://blog.laragent.ai/laragent-v0-5-preview-groq-api-audio-modality-and-more-configs/
https://redd.it/1m88ksa
@r_php
LarAgent
LarAgent v0.5 Preview: Groq API, Audio Modality, and More Configs
LarAgent just upgraded — big time. We're bringing powerful new AI capabilities, better control, and multi-modality support to Laravel developers.
Let’s break it down 👇
🔹 Groq API + Massive Model Expansion
Ever wanted access to blazing-fast AI models beyond…
Let’s break it down 👇
🔹 Groq API + Massive Model Expansion
Ever wanted access to blazing-fast AI models beyond…
Why I Prefer Procedural PHP
There’s a reason I keep reaching for plain, procedural PHP when I build. It’s not about being old-school or resisting frameworks. It’s about clarity, control, and getting the job done without the overhead.
# 🧱 1. I Don’t Need Fancy Terms
In procedural PHP, I don’t have to wrestle with abstract terms like "model," "resource," or "controller."
I write a function: that’s my logic.
I fetch some rows: that’s my data.
I display it in a table: that’s my output.
That’s it. No mental gymnastics. Just code that does what I want.
# 🔍 2. I See Everything That’s Happening
No magic. No hidden behavior. When I write procedural PHP, I know exactly what’s running and in what order. Every query, every echo, every variable — it’s all mine to control.
Frameworks can be helpful, but they often hide a lot. With procedural, I don’t need to trace through middleware or abstract classes just to understand what’s going on.
# 🪶 3. It’s Lightweight and Fast
I can spin up a full feature — like a data table with CRUD — using just a few PHP files and a database connection. No installations, no package managers, no artisan commands. It just works.
For admin panels, dashboards, internal tools, or teaching — procedural PHP gets me there faster.
# 📄 4. The Architecture Still Exists — It’s Just Natural
I may not call them "models" or "resources," but I still use the same ideas:
I separate logic into functions (model behavior)
I write clean HTML output (view)
I structure files by purpose (controller-like)
It’s MVC — just without the ceremony.
# 🧠 5. It Teaches You What’s Actually Happening
When students start with procedural PHP, they learn how things work, not just how to use a framework. They see SQL. They understand what
That’s powerful. And it's real learning.
# 🚀 Final Thought
I don’t need a framework to write good code. I need clear logic, a direct path to the data, and full control of the output. And that’s exactly what procedural PHP gives me.
It’s not outdated. It’s not primitive.
It’s honest, practical, and perfectly suited to many of the things I build.
>
https://redd.it/1m8ubvl
@r_php
There’s a reason I keep reaching for plain, procedural PHP when I build. It’s not about being old-school or resisting frameworks. It’s about clarity, control, and getting the job done without the overhead.
# 🧱 1. I Don’t Need Fancy Terms
In procedural PHP, I don’t have to wrestle with abstract terms like "model," "resource," or "controller."
I write a function: that’s my logic.
I fetch some rows: that’s my data.
I display it in a table: that’s my output.
That’s it. No mental gymnastics. Just code that does what I want.
# 🔍 2. I See Everything That’s Happening
No magic. No hidden behavior. When I write procedural PHP, I know exactly what’s running and in what order. Every query, every echo, every variable — it’s all mine to control.
Frameworks can be helpful, but they often hide a lot. With procedural, I don’t need to trace through middleware or abstract classes just to understand what’s going on.
# 🪶 3. It’s Lightweight and Fast
I can spin up a full feature — like a data table with CRUD — using just a few PHP files and a database connection. No installations, no package managers, no artisan commands. It just works.
For admin panels, dashboards, internal tools, or teaching — procedural PHP gets me there faster.
# 📄 4. The Architecture Still Exists — It’s Just Natural
I may not call them "models" or "resources," but I still use the same ideas:
I separate logic into functions (model behavior)
I write clean HTML output (view)
I structure files by purpose (controller-like)
It’s MVC — just without the ceremony.
# 🧠 5. It Teaches You What’s Actually Happening
When students start with procedural PHP, they learn how things work, not just how to use a framework. They see SQL. They understand what
$_POST means. They learn to debug raw errors and fix their own queries.That’s powerful. And it's real learning.
# 🚀 Final Thought
I don’t need a framework to write good code. I need clear logic, a direct path to the data, and full control of the output. And that’s exactly what procedural PHP gives me.
It’s not outdated. It’s not primitive.
It’s honest, practical, and perfectly suited to many of the things I build.
>
https://redd.it/1m8ubvl
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community