Why setting your PHP memory limit to 60GB won't help
https://devcenter.upsun.com/posts/why-setting-your-php-memory-limit-to-60gb-wont-help/
https://redd.it/1pba1oz
@r_php
https://devcenter.upsun.com/posts/why-setting-your-php-memory-limit-to-60gb-wont-help/
https://redd.it/1pba1oz
@r_php
Upsun
Why setting your PHP memory limit to 60GB won't help
When you see a PHP memory limit error, your instinct shouldn't be to just increase the limit. Learn what PHP memory_limit actually does and why blindly increasing it can hurt your site's uptime.
Laravel Christmas themed advent calendar - quiz app
https://youtu.be/ymXqrRRrnqM
https://redd.it/1pbcyq7
@r_php
https://youtu.be/ymXqrRRrnqM
https://redd.it/1pbcyq7
@r_php
YouTube
Laravel Advent Calendar 2025 - Quiz App | Day 1
Advent Calendar 2025 | Quiz App | Laravel | Day 1
In this video I'll be setting up the project.
Welcome to the Laravel Advent Calendar 2025 series, where we in Livewire will be building a quiz app.
Discord: https://discord.gg/79SrV4v
Get early access…
In this video I'll be setting up the project.
Welcome to the Laravel Advent Calendar 2025 series, where we in Livewire will be building a quiz app.
Discord: https://discord.gg/79SrV4v
Get early access…
We built an AI powered PHP framework
Hey everyone
We’ve been working on a new PHP framework and wanted to share it here ! The idea was to combine the best of both worlds : Laravel and Symfony, to create something that feels like us.
One of the things we are really excited about is that we integrated a bridge between Symfony AI and our framework, so you can use AI directly inside the framework. Our goal is to make it easier to use AI in real projects without a lot of work.
We’d love to hear your thoughts, feedback or suggestions for improvements. We still working on it and it is challenging !
Thanks in advance !
https://github.com/doppar/doppar
https://redd.it/1pbgtkq
@r_php
Hey everyone
We’ve been working on a new PHP framework and wanted to share it here ! The idea was to combine the best of both worlds : Laravel and Symfony, to create something that feels like us.
One of the things we are really excited about is that we integrated a bridge between Symfony AI and our framework, so you can use AI directly inside the framework. Our goal is to make it easier to use AI in real projects without a lot of work.
We’d love to hear your thoughts, feedback or suggestions for improvements. We still working on it and it is challenging !
Thanks in advance !
https://github.com/doppar/doppar
https://redd.it/1pbgtkq
@r_php
GitHub
GitHub - doppar/doppar: Doppar Framework Skeleton
Doppar Framework Skeleton. Contribute to doppar/doppar development by creating an account on GitHub.
Laravel Octane + Multi-tenancy + Yajra Datatables: Second tenant can't load data (state leaking issue)
Hey everyone, I'm stuck with a tricky state leaking problem and hoping someone has dealt with this scenario before.
**My Stack:**
* Laravel with Swoole via Octane
* Multi-tenancy using `stancl/tenancy` (archtechx/tenancy)
* Redis for cache with tenant-specific prefixes
* Yajra Datatables for server-side processing
**The Problem:**
When the **first tenant** logs in after `octane:reload`, everything works perfectly - all datatables load data correctly. However, when a **second tenant** logs in (using the same worker/PID), some datatables simply don't return data even though the records exist in their database. It's not all datatables - some work fine, but specific ones consistently fail for the second tenant.
**What I've Tried:**
* Enabled `RedisTenancyBootstrapper` and `CacheTenancyBootstrapper` in tenancy config
* Set `persistent => false` in Redis connection config
* Added `Redis::purge()` in `TenancyBootstrapping` event
* Used `app()->forgetInstance()` for redis, cache, and [cache.store](http://cache.store)
* Added Yajra classes to Octane's `flush` array
* Created middleware to reset datatables instances per request
* Verified Redis keys have correct tenant prefixes (they do!)
**Debug Info:**
* Logs confirm the tenant boots correctly with the right prefix
* Same worker PID serves both tenants (expected with Octane)
* Redis disconnect/purge logs appear correctly
* The issue is NOT with all datatables, only specific ones
**My Theory:**
Since Redis isolation seems correct (keys have proper prefixes), I suspect the Yajra Datatables service is holding onto the `Request` object or query state from the first tenant, even after attempting to flush it. But I can't pinpoint exactly what's being cached in memory.
Has anyone successfully run this exact combo (Octane + stancl/tenancy + Yajra Datatables)? Is there a known incompatibility or specific service that needs manual cleanup between tenant switches?
https://redd.it/1pbn84f
@r_php
Hey everyone, I'm stuck with a tricky state leaking problem and hoping someone has dealt with this scenario before.
**My Stack:**
* Laravel with Swoole via Octane
* Multi-tenancy using `stancl/tenancy` (archtechx/tenancy)
* Redis for cache with tenant-specific prefixes
* Yajra Datatables for server-side processing
**The Problem:**
When the **first tenant** logs in after `octane:reload`, everything works perfectly - all datatables load data correctly. However, when a **second tenant** logs in (using the same worker/PID), some datatables simply don't return data even though the records exist in their database. It's not all datatables - some work fine, but specific ones consistently fail for the second tenant.
**What I've Tried:**
* Enabled `RedisTenancyBootstrapper` and `CacheTenancyBootstrapper` in tenancy config
* Set `persistent => false` in Redis connection config
* Added `Redis::purge()` in `TenancyBootstrapping` event
* Used `app()->forgetInstance()` for redis, cache, and [cache.store](http://cache.store)
* Added Yajra classes to Octane's `flush` array
* Created middleware to reset datatables instances per request
* Verified Redis keys have correct tenant prefixes (they do!)
**Debug Info:**
* Logs confirm the tenant boots correctly with the right prefix
* Same worker PID serves both tenants (expected with Octane)
* Redis disconnect/purge logs appear correctly
* The issue is NOT with all datatables, only specific ones
**My Theory:**
Since Redis isolation seems correct (keys have proper prefixes), I suspect the Yajra Datatables service is holding onto the `Request` object or query state from the first tenant, even after attempting to flush it. But I can't pinpoint exactly what's being cached in memory.
Has anyone successfully run this exact combo (Octane + stancl/tenancy + Yajra Datatables)? Is there a known incompatibility or specific service that needs manual cleanup between tenant switches?
https://redd.it/1pbn84f
@r_php
Laravel is hiring a Community Manager!
Hey all! Admin approved message here. :)
Laravel is hiring a Community Manager to engage with the community on X, Discord, and here on Reddit of course.
Link to job → https://apply.workable.com/laravel/j/D34D04F351/
You'd work closely with Marketing, Dev Rel, and our Product teams. It's great for someone who has a background in Laravel but doesn't want to spend their whole day in the code mines anymore.
We also have a few other roles open if that one doesn't strike your fancy. Feel free to DM me me if you have questions or just comment here.
https://redd.it/1pbrjfu
@r_php
Hey all! Admin approved message here. :)
Laravel is hiring a Community Manager to engage with the community on X, Discord, and here on Reddit of course.
Link to job → https://apply.workable.com/laravel/j/D34D04F351/
You'd work closely with Marketing, Dev Rel, and our Product teams. It's great for someone who has a background in Laravel but doesn't want to spend their whole day in the code mines anymore.
We also have a few other roles open if that one doesn't strike your fancy. Feel free to DM me me if you have questions or just comment here.
https://redd.it/1pbrjfu
@r_php
Workable
Developer Relations Community Manager - Laravel
At Laravel, we are committed to creating tools that empower developers to build exceptional web applications while nurturing a supportive and inclusive global community. By joining our team, you’ll play a pivotal role in helping developers succeed and ...
Literature
It’s been a while since I’ve looked at any Laravel books. What are the current books out there for building modern applications using best practices?
https://redd.it/1pc4lul
@r_php
It’s been a while since I’ve looked at any Laravel books. What are the current books out there for building modern applications using best practices?
https://redd.it/1pc4lul
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Using landlock in a php noscript
There's a maturing API in Linux called landlock. It looks really promising as a way for applications to state their access intentions and then lock themselves into that.
Based on dealing with past PHP exploits, this would be a great additional way to limit access to the filesystem and to the network in a way that would be another speed bump for the nefarious out there.
However, the settings remain active for a thread/process. I haven't really dug into the weeds on low level php deployments. Do the usual deployment models launch threads/processes for each noscript or use a thread/process pool? If the latter, this wouldn't work.
https://redd.it/1pc4nwb
@r_php
There's a maturing API in Linux called landlock. It looks really promising as a way for applications to state their access intentions and then lock themselves into that.
Based on dealing with past PHP exploits, this would be a great additional way to limit access to the filesystem and to the network in a way that would be another speed bump for the nefarious out there.
However, the settings remain active for a thread/process. I haven't really dug into the weeds on low level php deployments. Do the usual deployment models launch threads/processes for each noscript or use a thread/process pool? If the latter, this wouldn't work.
https://redd.it/1pc4nwb
@r_php
landlock.io
Landlock: Unprivileged Sandboxing — Landlock documentation
Landlock: the Linux sandboxing mechanism
What’s one “unpopular opinion” you have about modern PHP development?
I feel like everyone talks about frameworks, performance, and best practices, but PHP devs rarely share the real hot takes. So I’m curious:
What’s one opinion you have about PHP that most devs would probably disagree with?
https://redd.it/1pc6c4v
@r_php
I feel like everyone talks about frameworks, performance, and best practices, but PHP devs rarely share the real hot takes. So I’m curious:
What’s one opinion you have about PHP that most devs would probably disagree with?
https://redd.it/1pc6c4v
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
ANN Restler v6.0.0: Zero-Boilerplate PHP REST API Framework with Async Support
Hi r/PHP! 👋
We're excited to announce Restler v6.0.0, a complete rebuild of our PHP REST API framework that's been in production since 2010.
# What's Restler?
Restler is for developers who want to build REST APIs in PHP without fighting boilerplate. You write a class, Restler handles the rest:
class Products {
function get(int $id): array {
return Database::findProduct($id);
}
}
$api = new Restler();
$api->addAPIClass(Products::class);
$api->handle();
That's it.
Routes? Auto-generated.
Validation? Type hints + PHPDoc.
Documentation? OpenAPI 3.0 auto-generated.
Content negotiation? JSON, XML, CSV, Excel—automatic.
HTTP status codes? Correct ones, automatic.
# What's New in v6?
1. Async Performance
Swoole/ReactPHP support: 10-15x throughput vs traditional PHP-FPM
AWS Lambda/serverless ready (via Bref)
Same code works on all runtimes
2. Modern PHP 8+
Full PHP 8.0-8.5 support
Strict typing throughout
PSR-7 HTTP messages
PSR-11 container
3. Security First
Replaced unsafe `unserialize()` with JSON (prevents object injection)
JSONP callback validation
Template variable hardening
Professional security policy
4. Multi-Format
GET /api/products/123 → JSON
GET /api/products/123.xml → XML
GET /api/products/123.csv → CSV
GET /api/products/123.xlsx → Excel
One class. Every format.
5. Complete Documentation
12 comprehensive guides
18+ working examples
Migration guide from v5
Security best practices
# Comparison with Other Frameworks
|Feature|Restler|Laravel|Symfony|
|:-|:-|:-|:-|
|Boilerplate (LOC)|5|50+|60+|
|Learning curve|Minimal|Steep|Steep|
|Auto-docs|✅|🔨|🔨|
|Multi-format|✅|🔨|🔨|
|Type safety|✅|✅|✅|
|Async ready|✅|❌|❌|
|For APIs|✅ Primary|✅ Secondary|✅ Secondary|
Note: This is our take. Other frameworks are great for different use cases.
# Upgrading from v5
If you're using v5:
Minimal breaking changes
Migration guide: https://github.com/Luracast/Restler/blob/master/MIGRATION.md
Most APIs migrate in 2-4 hours
Same simplicity, better performance
# Getting Started
composer require luracast/restler:^6.0
Full docs: https://github.com/Luracast/Restler
# The Numbers
15 years in production
500K+ Packagist downloads
1,300+ GitHub stars
98.8% test coverage
Zero CVEs in recent versions
10-15x performance with async (Swoole)
# Community & Support
Questions? [GitHub Discussions](https://github.com/Luracast/Restler/discussions)
Issues? GitHub Issues
Security? [SECURITY.md](https://github.com/Luracast/Restler/blob/master/SECURITY.md)
# Why This Matters
If you've been frustrated with:
Boilerplate in your REST API framework
Slow performance with traditional PHP-FPM
Overhead of learning complex frameworks just for an API
Documentation that's outdated or incomplete
Restler might be the framework you've been looking for.
We're not trying to replace Laravel/Symfony (great frameworks!). We're offering a focused, simple alternative for API development.
# Questions I Expect
Q: Why not just use Laravel/Symfony?
A: For APIs, Restler does more with less. But Laravel/Symfony are great for web apps.
Q: Is it battle-tested?
A: 15 years in production. Fortune 500 companies use it. Zero recent CVEs.
Q: What if I need a web UI?
A: Restler focuses on APIs. Use it with a separate frontend (React, Vue, etc.).
Q: How hard is the migration from v5?
A: 2-4 hours for typical APIs. See migration guide.
Q: Can I use it with Laravel?
A: Restler is standalone. But you could use both (Restler with Laravel components).
Q: What about GraphQL?
A: Built-in support in v6.
# Links
GitHub:
Hi r/PHP! 👋
We're excited to announce Restler v6.0.0, a complete rebuild of our PHP REST API framework that's been in production since 2010.
# What's Restler?
Restler is for developers who want to build REST APIs in PHP without fighting boilerplate. You write a class, Restler handles the rest:
class Products {
function get(int $id): array {
return Database::findProduct($id);
}
}
$api = new Restler();
$api->addAPIClass(Products::class);
$api->handle();
That's it.
Routes? Auto-generated.
Validation? Type hints + PHPDoc.
Documentation? OpenAPI 3.0 auto-generated.
Content negotiation? JSON, XML, CSV, Excel—automatic.
HTTP status codes? Correct ones, automatic.
# What's New in v6?
1. Async Performance
Swoole/ReactPHP support: 10-15x throughput vs traditional PHP-FPM
AWS Lambda/serverless ready (via Bref)
Same code works on all runtimes
2. Modern PHP 8+
Full PHP 8.0-8.5 support
Strict typing throughout
PSR-7 HTTP messages
PSR-11 container
3. Security First
Replaced unsafe `unserialize()` with JSON (prevents object injection)
JSONP callback validation
Template variable hardening
Professional security policy
4. Multi-Format
GET /api/products/123 → JSON
GET /api/products/123.xml → XML
GET /api/products/123.csv → CSV
GET /api/products/123.xlsx → Excel
One class. Every format.
5. Complete Documentation
12 comprehensive guides
18+ working examples
Migration guide from v5
Security best practices
# Comparison with Other Frameworks
|Feature|Restler|Laravel|Symfony|
|:-|:-|:-|:-|
|Boilerplate (LOC)|5|50+|60+|
|Learning curve|Minimal|Steep|Steep|
|Auto-docs|✅|🔨|🔨|
|Multi-format|✅|🔨|🔨|
|Type safety|✅|✅|✅|
|Async ready|✅|❌|❌|
|For APIs|✅ Primary|✅ Secondary|✅ Secondary|
Note: This is our take. Other frameworks are great for different use cases.
# Upgrading from v5
If you're using v5:
Minimal breaking changes
Migration guide: https://github.com/Luracast/Restler/blob/master/MIGRATION.md
Most APIs migrate in 2-4 hours
Same simplicity, better performance
# Getting Started
composer require luracast/restler:^6.0
Full docs: https://github.com/Luracast/Restler
# The Numbers
15 years in production
500K+ Packagist downloads
1,300+ GitHub stars
98.8% test coverage
Zero CVEs in recent versions
10-15x performance with async (Swoole)
# Community & Support
Questions? [GitHub Discussions](https://github.com/Luracast/Restler/discussions)
Issues? GitHub Issues
Security? [SECURITY.md](https://github.com/Luracast/Restler/blob/master/SECURITY.md)
# Why This Matters
If you've been frustrated with:
Boilerplate in your REST API framework
Slow performance with traditional PHP-FPM
Overhead of learning complex frameworks just for an API
Documentation that's outdated or incomplete
Restler might be the framework you've been looking for.
We're not trying to replace Laravel/Symfony (great frameworks!). We're offering a focused, simple alternative for API development.
# Questions I Expect
Q: Why not just use Laravel/Symfony?
A: For APIs, Restler does more with less. But Laravel/Symfony are great for web apps.
Q: Is it battle-tested?
A: 15 years in production. Fortune 500 companies use it. Zero recent CVEs.
Q: What if I need a web UI?
A: Restler focuses on APIs. Use it with a separate frontend (React, Vue, etc.).
Q: How hard is the migration from v5?
A: 2-4 hours for typical APIs. See migration guide.
Q: Can I use it with Laravel?
A: Restler is standalone. But you could use both (Restler with Laravel components).
Q: What about GraphQL?
A: Built-in support in v6.
# Links
GitHub:
GitHub
Restler/MIGRATION.md at master · Luracast/Restler
Zero-boilerplate REST API framework for PHP 8+. Auto-generates routes, docs, validation. - Luracast/Restler
https://github.com/Luracast/Restler
Packagist: [https://packagist.org/packages/luracast/restler](https://packagist.org/packages/luracast/restler)
Documentation: https://github.com/Luracast/Restler/blob/master/README.md
Blog Post: [https://luracast.com/blog/restler-v6-launch](https://luracast.com/blog/restler-v6-launch) (link to your blog)
Discussions: https://github.com/Luracast/Restler/discussions
We'd love your feedback! Ask questions, share experiences, or tell us what you think.
Excited to hear what you build with Restler v6! 🚀
# P.S.
If you try it, drop a comment here. Love it? Hate it? Somewhere in between? Let us know!
https://redd.it/1pc99qm
@r_php
Packagist: [https://packagist.org/packages/luracast/restler](https://packagist.org/packages/luracast/restler)
Documentation: https://github.com/Luracast/Restler/blob/master/README.md
Blog Post: [https://luracast.com/blog/restler-v6-launch](https://luracast.com/blog/restler-v6-launch) (link to your blog)
Discussions: https://github.com/Luracast/Restler/discussions
We'd love your feedback! Ask questions, share experiences, or tell us what you think.
Excited to hear what you build with Restler v6! 🚀
# P.S.
If you try it, drop a comment here. Love it? Hate it? Somewhere in between? Let us know!
https://redd.it/1pc99qm
@r_php
GitHub
GitHub - Luracast/Restler: Zero-boilerplate REST API framework for PHP 8+. Auto-generates routes, docs, validation.
Zero-boilerplate REST API framework for PHP 8+. Auto-generates routes, docs, validation. - Luracast/Restler
PHP Landscape Survey
Disclaimer: I'm employed for Perforce Zend.
Calling PHP developers! The 2026 State of Open Source and PHP Survey needs your technical perspective. Help us analyze enterprise OSS adoption patterns and PHP ecosystem evolution.
Plus, for every 500 responses we receive, we'll increase our donation to open source initiatives by $1K
We will be closing the survey soon. I can share the report with the community once produced in the spring!
https://www.surveymonkey.com/r/7SXYYMQ
https://redd.it/1pcayj8
@r_php
Disclaimer: I'm employed for Perforce Zend.
Calling PHP developers! The 2026 State of Open Source and PHP Survey needs your technical perspective. Help us analyze enterprise OSS adoption patterns and PHP ecosystem evolution.
Plus, for every 500 responses we receive, we'll increase our donation to open source initiatives by $1K
We will be closing the survey soon. I can share the report with the community once produced in the spring!
https://www.surveymonkey.com/r/7SXYYMQ
https://redd.it/1pcayj8
@r_php
Surveymonkey
2026 State of Open Source Survey
How do you use open source?
UUID data type. Generated on database side or in code, on PHP side ?
Since Mariadb 10.7, there is the UUID data type available.
In Postgres, UUID data type was available since forever.
Now , my dilemma is: if I want to use in my project UUID data type, should i:
1. generate the
OR
2. count on database engine to autogenerate an uuid ?
Option #1 have the advantage that Doctrine is ok with it , and I do not need to care if the database can generate an uuid_v4 or uuid_v7.
Option #2 have the advantage that it reduces the CPU cycles of PHP code and move the burden of generating the uuid on database side .
What do you think would be the better options and why ?
https://redd.it/1pcf5hh
@r_php
Since Mariadb 10.7, there is the UUID data type available.
In Postgres, UUID data type was available since forever.
Now , my dilemma is: if I want to use in my project UUID data type, should i:
1. generate the
uuid on PHP side, using Ramsey's library and insert it in a uuid data type column ?OR
2. count on database engine to autogenerate an uuid ?
Option #1 have the advantage that Doctrine is ok with it , and I do not need to care if the database can generate an uuid_v4 or uuid_v7.
Option #2 have the advantage that it reduces the CPU cycles of PHP code and move the burden of generating the uuid on database side .
What do you think would be the better options and why ?
https://redd.it/1pcf5hh
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Laravel Prompts - Beautiful CLI interfaces for everyone!
https://youtu.be/vGYX07v6ygQ
https://redd.it/1pciy4y
@r_php
https://youtu.be/vGYX07v6ygQ
https://redd.it/1pciy4y
@r_php
YouTube
Prompts - CLI beauty for Laravel
Laravel Prompts is a beautiful CLI library for Laravel applications. Create stunning terminal interfaces with text inputs, selections, confirmations, and more. Transform boring command-line interactions into delightful user experiences.
➡️ Learn more
h…
➡️ Learn more
h…
Looking for a PHP noscript that can timeline email correspondence between people
Hi all
I’m looking for a PHP noscript that can potentially log into an IMAP email Box and read and process these emails (any unread emails) and strip attachments.
Catalogue them into a database and generate a timeline of the correspondence
There may be multiple people involved in this same email chain
Alternatively I’m also looking for a EML file viewer with browser support?
Thanks!
https://redd.it/1pcx44h
@r_php
Hi all
I’m looking for a PHP noscript that can potentially log into an IMAP email Box and read and process these emails (any unread emails) and strip attachments.
Catalogue them into a database and generate a timeline of the correspondence
There may be multiple people involved in this same email chain
Alternatively I’m also looking for a EML file viewer with browser support?
Thanks!
https://redd.it/1pcx44h
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Cloudflare Vectorize driver for Laravel Scout
I've created a Scout driver for Cloudflare Vectorize vector databases. It's more a proof of concept at the moment, although it is functional - if you're looking for symantic search, Vectorize is a neat way to deliver it.
You can find it here https://github.com/brynj-digital/laravel-scout-vectorize
https://redd.it/1pciy2d
@r_php
I've created a Scout driver for Cloudflare Vectorize vector databases. It's more a proof of concept at the moment, although it is functional - if you're looking for symantic search, Vectorize is a neat way to deliver it.
You can find it here https://github.com/brynj-digital/laravel-scout-vectorize
https://redd.it/1pciy2d
@r_php
GitHub
GitHub - brynj-digital/laravel-scout-vectorize: Laravel Scout driver for Cloudflare Vectorize database
Laravel Scout driver for Cloudflare Vectorize database - brynj-digital/laravel-scout-vectorize
Leveraging Promises and HTTP Pooling
https://cosmastech.com/2025/12/01/request-pooling-pattern.html
https://redd.it/1pd35x6
@r_php
https://cosmastech.com/2025/12/01/request-pooling-pattern.html
https://redd.it/1pd35x6
@r_php
cosmastech
Leveraging Promises and HTTP Pooling
Laravel 8 first introduced HTTP request pooling, thanks to a contribution from Andrea Marco Sartori. This allows developers to write code which will execute any number of HTTP requests concurrently. Under the hood, this is made possible thanks to the async…
SymfonyCon Amsterdam 2025: Relive the Magic of SymfonyCon Amsterdam 2025
https://symfony.com/blog/symfonycon-amsterdam-2025-relive-the-magic-of-symfonycon-amsterdam-2025?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1pd4qiz
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-relive-the-magic-of-symfonycon-amsterdam-2025?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1pd4qiz
@r_php
Symfony
SymfonyCon Amsterdam 2025: Relive the Magic of SymfonyCon Amsterdam 2025 (Symfony Blog)
SymfonyCon Amsterdam 2025 reunited 1,200+ developers from 38 countries for a week of talks, workshops, and unforgettable community moments. A true celebration of learning, connection, and everything S…
Swoole or Go for this specific use case
I have a certain part of my ecommerce website builder SaaS that I'm rewriting from regular PHP. Basically it's a page builder like Shopify's page builder. It allows people to customize sections, which are in turn written in a custom templating language and have reflection built-in to expose customization options inside the page builder per-section and per-block. It also has a live preview that shows the changes made in real-time.
The template interpreter is written in Rust and it also handles the user-facing side of people's websites, while the admin panel is PHP. So the theme builder backend will basically have to ask the Rust process to re-interpret the preview and return the HTML on every change, probably through a socket connection.
There are several reasons for the rewrite apart from speed - the codebase a mess from 3 years of feature additions, removals and just using less-than-optimal logic for many things. and also keeping it as part of the admin panel rather than on a separate domain means if something happens to it or if there's a traffic surge it affects the whole admin panel's performance (the rest of the admin panel is still PHP and I don't plan on migrating).
I love PHP - I think it's probably the most flexible language out there and I wouldn't have been able to make my platform as powerful as it is right now in any other language. I've been using it for 8+ years and it's still my favourite language. However I've never used Swoole or Go (though I have used some Roadrunner) so I was wondering if I should go for Swoole or with Go for this project. Does Swoole have any advantages other than a familiar syntax?
https://redd.it/1pd3f27
@r_php
I have a certain part of my ecommerce website builder SaaS that I'm rewriting from regular PHP. Basically it's a page builder like Shopify's page builder. It allows people to customize sections, which are in turn written in a custom templating language and have reflection built-in to expose customization options inside the page builder per-section and per-block. It also has a live preview that shows the changes made in real-time.
The template interpreter is written in Rust and it also handles the user-facing side of people's websites, while the admin panel is PHP. So the theme builder backend will basically have to ask the Rust process to re-interpret the preview and return the HTML on every change, probably through a socket connection.
There are several reasons for the rewrite apart from speed - the codebase a mess from 3 years of feature additions, removals and just using less-than-optimal logic for many things. and also keeping it as part of the admin panel rather than on a separate domain means if something happens to it or if there's a traffic surge it affects the whole admin panel's performance (the rest of the admin panel is still PHP and I don't plan on migrating).
I love PHP - I think it's probably the most flexible language out there and I wouldn't have been able to make my platform as powerful as it is right now in any other language. I've been using it for 8+ years and it's still my favourite language. However I've never used Swoole or Go (though I have used some Roadrunner) so I was wondering if I should go for Swoole or with Go for this project. Does Swoole have any advantages other than a familiar syntax?
https://redd.it/1pd3f27
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community