I built a new PHP Runtime to run PHP applications without Nginx and PHP-FPM
Hey everyone,
Over the past year, I've been building a PHP Application Server called PHPStreamServer.
Think of it as a new way to run PHP applications - no need for Nginx, PHP-FPM, or external GO binaries.
The goal is to bring a runtime to the PHP ecosystem that installs directly via Composer and requires only PHP itself to run.
The cool part is, it's asynchronous. It leverages AMPHP components, making true asynchrony possible in PHP.
This isn't a strict requirement though - you can still run synchronous code, but if you choose to use AMP components, you can take full advantage of async execution.
PHPStreamServer is modular and ships with set of plugins that cover most common needs for PHP apps (except for the core supervisor, which is always included):
- Supervisor (process manager)
- Http Server
- Cron-like Scheduler
- Logger (PSR-3 compatible)
- Prometheus Metrics Server
- File Monitor (auto-reloads the server on file changes)
How is this differs from existing PHP web server implementations like amphp/http-server or Swoole's web server?
Those are bare web server implementations. PHPStreamServer is an application server - it takes care of the entire application lifecycle:
- Deciding how many processes to launch
- Routing requests between processes
- Restarting processes after a crash or a certain condition
- Managing logs
- Providing an interface to manage and monitor the server
In other words, it's not just a way to serve HTTP requests - it's the full runtime environment for PHP applications.
I'd love to hear any thoughts, suggestions, or feature requests.
Website:
https://phpstreamserver.dev/
Github:
https://github.com/phpstreamserver/phpstreamserver/
https://redd.it/1mogmgi
@r_php
Hey everyone,
Over the past year, I've been building a PHP Application Server called PHPStreamServer.
Think of it as a new way to run PHP applications - no need for Nginx, PHP-FPM, or external GO binaries.
The goal is to bring a runtime to the PHP ecosystem that installs directly via Composer and requires only PHP itself to run.
The cool part is, it's asynchronous. It leverages AMPHP components, making true asynchrony possible in PHP.
This isn't a strict requirement though - you can still run synchronous code, but if you choose to use AMP components, you can take full advantage of async execution.
PHPStreamServer is modular and ships with set of plugins that cover most common needs for PHP apps (except for the core supervisor, which is always included):
- Supervisor (process manager)
- Http Server
- Cron-like Scheduler
- Logger (PSR-3 compatible)
- Prometheus Metrics Server
- File Monitor (auto-reloads the server on file changes)
How is this differs from existing PHP web server implementations like amphp/http-server or Swoole's web server?
Those are bare web server implementations. PHPStreamServer is an application server - it takes care of the entire application lifecycle:
- Deciding how many processes to launch
- Routing requests between processes
- Restarting processes after a crash or a certain condition
- Managing logs
- Providing an interface to manage and monitor the server
In other words, it's not just a way to serve HTTP requests - it's the full runtime environment for PHP applications.
I'd love to hear any thoughts, suggestions, or feature requests.
Website:
https://phpstreamserver.dev/
Github:
https://github.com/phpstreamserver/phpstreamserver/
https://redd.it/1mogmgi
@r_php
phpstreamserver.dev
PHPStreamServer: Application server and process manager for modern PHP applications
High-performance PHP application server and process manager written in PHP
Few Laravel packages made by me
**Laravel Locations**
Add models for countries, cities, areas, languages, and currencies to your Laravel application.
Link: https://packagist.org/packages/milenmk/laravel-locations
**Laravel Blacklist**
Implement a filter to block profane and inappropriate words from user input.
Link: https://packagist.org/packages/milenmk/laravel-blacklist
**Laravel GDPR Exporter**
A user data exporter that complies with GDPR regulations and includes support for Livewire.
Link: https://packagist.org/packages/milenmk/laravel-gdpr-exporter
**Email Change Confirmation (in development)**
Enhance the security of the email change process by requiring users to confirm (or deny) the change via an email sent to their current email address.
Link: https://github.com/milenmk/laravel-email-change-confirmation
https://redd.it/1mpj0q0
@r_php
**Laravel Locations**
Add models for countries, cities, areas, languages, and currencies to your Laravel application.
Link: https://packagist.org/packages/milenmk/laravel-locations
**Laravel Blacklist**
Implement a filter to block profane and inappropriate words from user input.
Link: https://packagist.org/packages/milenmk/laravel-blacklist
**Laravel GDPR Exporter**
A user data exporter that complies with GDPR regulations and includes support for Livewire.
Link: https://packagist.org/packages/milenmk/laravel-gdpr-exporter
**Email Change Confirmation (in development)**
Enhance the security of the email change process by requiring users to confirm (or deny) the change via an email sent to their current email address.
Link: https://github.com/milenmk/laravel-email-change-confirmation
https://redd.it/1mpj0q0
@r_php
packagist.org
milenmk/laravel-locations - Packagist
Add Countries, Cities, Areas, Languages and Currencies models to your Laravel application
Why isn't PHP as popular if it's used everywhere?
In my opinion, PHP isn't as popular amongst forums, reddit, word of mouth, memes, job listings etc. compared to node/typenoscript. For example the node subreddit has twice as many members, and StackOverflow ranks it much lower in surveys.
However PHP is used 70-80% of the web, which blows my mind, I would have estimated it to be 40% if it wasn't for that statistic.
Why don't more people talk about PHP if it's used more?
https://redd.it/1mpme0p
@r_php
In my opinion, PHP isn't as popular amongst forums, reddit, word of mouth, memes, job listings etc. compared to node/typenoscript. For example the node subreddit has twice as many members, and StackOverflow ranks it much lower in surveys.
However PHP is used 70-80% of the web, which blows my mind, I would have estimated it to be 40% if it wasn't for that statistic.
Why don't more people talk about PHP if it's used more?
https://redd.it/1mpme0p
@r_php
survey.stackoverflow.co
Technology | 2024 Stack Overflow Developer Survey
Do you guys have some tips for your first formal project
I'm doing this for my backend specialization. I am a ux-designer so I lean very heavy on brainstorming, finding as many perspectives etc as possible.
Do you guys have anything that you would advise for relating to this subject matter?
https://redd.it/1mpq0it
@r_php
I'm doing this for my backend specialization. I am a ux-designer so I lean very heavy on brainstorming, finding as many perspectives etc as possible.
Do you guys have anything that you would advise for relating to this subject matter?
https://redd.it/1mpq0it
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Why should a PHP file always start with that ugly <?php tag ?
No other language has this ugly property. Yes I know, it is from the original 'Personal Home Page' with kinda 'rich HTML' approach in the 00s, but currently HTML code with embedded <? code ?> is very unreadable and barely used anymore.
I hope the PHP community will opt out this some day.
https://redd.it/1mprxiw
@r_php
No other language has this ugly property. Yes I know, it is from the original 'Personal Home Page' with kinda 'rich HTML' approach in the 00s, but currently HTML code with embedded <? code ?> is very unreadable and barely used anymore.
I hope the PHP community will opt out this some day.
https://redd.it/1mprxiw
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
FrankenPHP has reached 10,000 stars on GitHub
https://dunglas.dev/2025/08/frankenphp-has-reached-10000-stars-the-elephpant-plush-toy-is-coming/
https://redd.it/1mpzl43
@r_php
https://dunglas.dev/2025/08/frankenphp-has-reached-10000-stars-the-elephpant-plush-toy-is-coming/
https://redd.it/1mpzl43
@r_php
Kévin Dunglas - Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, FrankenPHP, Mercure.rocks, Vulcain.rocks and of some Symfony components.
FrankenPHP has reached 10,000 stars: the elePHPant plush toy is coming! - Kévin Dunglas
FrankenPHP has just reached 10,000 ⭐️ on GitHub! This important milestone was reached just a few months after the project joined the PHP Foundation, thanks to the hard work of the maintainers and contributors, those who spread the word about the project,…
Import One Million Rows To The Database - Christoph Rumpel
https://www.youtube.com/watch?v=CAi4WEKOT4A
https://redd.it/1mpz1kb
@r_php
https://www.youtube.com/watch?v=CAi4WEKOT4A
https://redd.it/1mpz1kb
@r_php
YouTube
Import One Million Rows To The Database (PHP/Laravel)
In this video, we explore different ways to import large CSV files in Laravel, benchmarking each approach and discussing their pros and cons. From simple collection-based imports to high-performance concurrent processing - let's try it out together.
📜 Repository…
📜 Repository…
Filament v4 – What's new (Video)
If anyone isn't up to date with Filament v4 yet, and prefers video over text: I did a quick introduction at a local Laravel Meetup that was recoded.
https://www.youtube.com/watch?v=8qyV696TALA
https://redd.it/1mpz4px
@r_php
If anyone isn't up to date with Filament v4 yet, and prefers video over text: I did a quick introduction at a local Laravel Meetup that was recoded.
https://www.youtube.com/watch?v=8qyV696TALA
https://redd.it/1mpz4px
@r_php
YouTube
What's new in Filament v4 with Dennis Koch
In his talk, Dennis will explain how Filament was improved in version 4 and demonstrate exciting new features and components you can look forward to.
Slides: https://denniskoch.dev/talks/filament-v4/
Website: https://denniskoch.dev/
Mastodon: https://ph…
Slides: https://denniskoch.dev/talks/filament-v4/
Website: https://denniskoch.dev/
Mastodon: https://ph…
Best strategies to distribute a PHP app in a container
There are many tutorials out there about building dev envs for PHP applications with Docker, or deploying them to container-based platforms.
But when it comes to distributing a containerized PHP application, the available information is rather scarce.
So I'm asking here.
Let say for example we need to distribute a Laravel or Symfony application as a Docker container. The user then need to download the container, run Composer and other install noscripts, provide some config options for the .env file, and some config files, before he can run the application.
How to do that easily? Passing options to the Docker cli or in Docker Compose might not be sufficient, since some config files might need for example to be populated with arrays of options.
https://redd.it/1mq53si
@r_php
There are many tutorials out there about building dev envs for PHP applications with Docker, or deploying them to container-based platforms.
But when it comes to distributing a containerized PHP application, the available information is rather scarce.
So I'm asking here.
Let say for example we need to distribute a Laravel or Symfony application as a Docker container. The user then need to download the container, run Composer and other install noscripts, provide some config options for the .env file, and some config files, before he can run the application.
How to do that easily? Passing options to the Docker cli or in Docker Compose might not be sufficient, since some config files might need for example to be populated with arrays of options.
https://redd.it/1mq53si
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
ConvertEmptyStringsToNull is garbage magic and I feel crazy
Guess I'm late to the party but while clearing out some legacy junk from a Laravel app I've just today realized that.... Laravel includes ConvertEmptyStringsToNull middleware globally by default. That's insane. Have we learned nothing from the great magic_quotes_gpc debacle of the early 2000's? Magic is bad, mkay? You might find it handy but it comes back to bite you in the butt, mkay?
I get it, you want to send your empty form inputs directly to your nullable database columns as easily as possible. Cool. What happens when you're using a POST value for literally anything else? What happens when you actually have a logical use case for empty-string versus null?
"Bro, just disable it for the attributes you want." NO. I got a better idea. Turn that shit OFF by default and ENABLE it where null is important. Don't ASSUME everyone wants the same magic. It's a bad idea. Yes, I know I can disable it completely, and I've done that. So I'm fine, just disappointed that it's on by default. It makes Laravel look dumb and it teaches bad habits. Arrrrgh!
Thank you for coming to my ~~Ted~~ Laracon Talk.
https://redd.it/1mqejhp
@r_php
Guess I'm late to the party but while clearing out some legacy junk from a Laravel app I've just today realized that.... Laravel includes ConvertEmptyStringsToNull middleware globally by default. That's insane. Have we learned nothing from the great magic_quotes_gpc debacle of the early 2000's? Magic is bad, mkay? You might find it handy but it comes back to bite you in the butt, mkay?
I get it, you want to send your empty form inputs directly to your nullable database columns as easily as possible. Cool. What happens when you're using a POST value for literally anything else? What happens when you actually have a logical use case for empty-string versus null?
"Bro, just disable it for the attributes you want." NO. I got a better idea. Turn that shit OFF by default and ENABLE it where null is important. Don't ASSUME everyone wants the same magic. It's a bad idea. Yes, I know I can disable it completely, and I've done that. So I'm fine, just disappointed that it's on by default. It makes Laravel look dumb and it teaches bad habits. Arrrrgh!
Thank you for coming to my ~~Ted~~ Laracon Talk.
https://redd.it/1mqejhp
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Simple, fully customizable CMS for single-page site
I’m creating a single-page site, and I’m looking for a simple, free and open-source CMS that is fully customizable. Editing the page should be easy and intuitive for a non-technical person (the site owner). It should be based on PHP (no Node.js or database) and be runnable on XAMPP. If possible, I want to use my existing HTML/CSS/JavaScript code (including media queries and the carousel library). Any recommendations?
https://redd.it/1mqe0nr
@r_php
I’m creating a single-page site, and I’m looking for a simple, free and open-source CMS that is fully customizable. Editing the page should be easy and intuitive for a non-technical person (the site owner). It should be based on PHP (no Node.js or database) and be runnable on XAMPP. If possible, I want to use my existing HTML/CSS/JavaScript code (including media queries and the carousel library). Any recommendations?
https://redd.it/1mqe0nr
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
🎉 r/Laravel just hit 100,000 members!
From small snippets to deep architecture discussions, this community has grown into one of the best places to share packages, give feedback, and push Laravel further.
Some stats for the past 12 months:
- 1.3K Posts
- 27.6K Comments
- 7.5m Visits
Thanks to everyone who asks thoughtful questions, shares knowledge, and helps keep things welcoming. Here’s to the next 100k.
https://redd.it/1mqiyjs
@r_php
From small snippets to deep architecture discussions, this community has grown into one of the best places to share packages, give feedback, and push Laravel further.
Some stats for the past 12 months:
- 1.3K Posts
- 27.6K Comments
- 7.5m Visits
Thanks to everyone who asks thoughtful questions, shares knowledge, and helps keep things welcoming. Here’s to the next 100k.
https://redd.it/1mqiyjs
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Laravel Pivot Tables: Do You Add ID and Timestamps? (Poll Result)
https://www.youtube.com/watch?v=aPOmLfzWu-E
https://redd.it/1mqqjvx
@r_php
https://www.youtube.com/watch?v=aPOmLfzWu-E
https://redd.it/1mqqjvx
@r_php
YouTube
Laravel Pivot Tables: Do You Add ID and Timestamps? (Poll Result)
I've asked people on Twitter and LinkedIn whether they put id, created_at and updated_at in their many-to-many pivot tables. Let's review the results.
Official docs: https://laravel.com/docs/12.x/eloquent-relationships#many-to-many
Original poll on Twitter:…
Official docs: https://laravel.com/docs/12.x/eloquent-relationships#many-to-many
Original poll on Twitter:…
I made a 30fps CLI Tetris game in PHP after watching the Tetris movie
So I watched the "Tetris" movie and it was amazing!
I got itchy to build the tetris game in php and see how fast we it can turn out and specially the line clearning and the algos used, how can this be better? I am not a fluent PHP developer I used PHP mainly from high-school and recently been building apps using Laravel for clients (I am a experienced dev though)
LINK: https://gist.github.com/al3rez/e43f4bc86e50a79fca14529d4f2f2b8c
So feel free to roast it.
https://redd.it/1mqrr4z
@r_php
So I watched the "Tetris" movie and it was amazing!
I got itchy to build the tetris game in php and see how fast we it can turn out and specially the line clearning and the algos used, how can this be better? I am not a fluent PHP developer I used PHP mainly from high-school and recently been building apps using Laravel for clients (I am a experienced dev though)
LINK: https://gist.github.com/al3rez/e43f4bc86e50a79fca14529d4f2f2b8c
So feel free to roast it.
https://redd.it/1mqrr4z
@r_php
Gist
I made a 30fps CLI Tetris game in PHP after watching the Tetris movie
I made a 30fps CLI Tetris game in PHP after watching the Tetris movie - tetris.php
A Partial Function Application Library for Pipes
I've been playing with pipes for a bit now, and so I wanted to share a small library that allows you to perform partial function application over arbitrary closures:
// create a partial application compatible closure
$strreplace = p(strreplace(...));
// create a partial application using a bare underscore to annotate missing arguments
$dashreplace = $strreplace('-', , );
// and create another one based on the previous one
$snakecase = p($dashreplace)('', );
echo 'snake-case' |> strtolower(...) |> $snakecase(...);
// output: snakecase
repository: withinboredom/pfa: A partial function application library
The code itself is rather simple and licensed MIT. I'm excited to see variations in the wild and how this will grow until we get real partial applications.
https://redd.it/1mqsy4s
@r_php
I've been playing with pipes for a bit now, and so I wanted to share a small library that allows you to perform partial function application over arbitrary closures:
// create a partial application compatible closure
$strreplace = p(strreplace(...));
// create a partial application using a bare underscore to annotate missing arguments
$dashreplace = $strreplace('-', , );
// and create another one based on the previous one
$snakecase = p($dashreplace)('', );
echo 'snake-case' |> strtolower(...) |> $snakecase(...);
// output: snakecase
repository: withinboredom/pfa: A partial function application library
The code itself is rather simple and licensed MIT. I'm excited to see variations in the wild and how this will grow until we get real partial applications.
https://redd.it/1mqsy4s
@r_php
GitHub
GitHub - withinboredom/pfa: A partial function application library
A partial function application library. Contribute to withinboredom/pfa development by creating an account on GitHub.
REST API with Laravel 12
Hi!
I'm not new to PHP, I've been doing stuff with it on and off since PHP v3, it's not my favorite platform, but I know the rule of using the best(and often the simplest) tool for a specific task/job at hand. I'm not new to Laravel either, having done stuff with it when the scenario called for something like it, or the client demanded the usage of it, which brings me here, by the way.
I'm supposed to develop this REST service for this client who demands the usage of PHP and Laravel. I've used Laravel before, however, with a template engine, rendering pages; Needless to say, I wont be needing this feature here, there will be only REST endpoints and serialized data(as JSON), coming in and out.
Is there a specific set of flags one can pass to composer.phar or whatever that will bring me only what I need and leave out stuff like Blade, while creating an empty new project?
Also, is there somewhere in Laravel where I must/can inform it that this project is only a REST API, in order to it to behave better as such(be JSON-centric in dealing with error messages, validations and so on)?
Thank you so much for your time!
https://redd.it/1mqussm
@r_php
Hi!
I'm not new to PHP, I've been doing stuff with it on and off since PHP v3, it's not my favorite platform, but I know the rule of using the best(and often the simplest) tool for a specific task/job at hand. I'm not new to Laravel either, having done stuff with it when the scenario called for something like it, or the client demanded the usage of it, which brings me here, by the way.
I'm supposed to develop this REST service for this client who demands the usage of PHP and Laravel. I've used Laravel before, however, with a template engine, rendering pages; Needless to say, I wont be needing this feature here, there will be only REST endpoints and serialized data(as JSON), coming in and out.
Is there a specific set of flags one can pass to composer.phar or whatever that will bring me only what I need and leave out stuff like Blade, while creating an empty new project?
Also, is there somewhere in Laravel where I must/can inform it that this project is only a REST API, in order to it to behave better as such(be JSON-centric in dealing with error messages, validations and so on)?
Thank you so much for your time!
https://redd.it/1mqussm
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Any Symfony experts?
Have recently joined a Symfony project that is about 5 years old.
I’m finding it incredibility difficult to trace through the code.
For example we have an Entity that has about 900 lines before the constructor with lots of different attributes.
Most notably API routes being defined here. These entities are being used to handle the entity, validation, permissions and APIs.
There are no controllers in the whole project.
I know Symfony supports all these features, but the project has saw more staff leave than stay. From what I can see the original guys hired who wrote this code at the only ones who have sticked around.
So far seems a great company and a great salary. I can only thing that people are struggling with the source code and don’t hang around.
It is so difficult to follow the flow of the code and it’s taking me quite a while to complete simply tasks. Mainly because a lot of the time it’s goes into a Symfony black hole.
Is this normal for a Symfony project?
https://redd.it/1mr54vv
@r_php
Have recently joined a Symfony project that is about 5 years old.
I’m finding it incredibility difficult to trace through the code.
For example we have an Entity that has about 900 lines before the constructor with lots of different attributes.
Most notably API routes being defined here. These entities are being used to handle the entity, validation, permissions and APIs.
There are no controllers in the whole project.
I know Symfony supports all these features, but the project has saw more staff leave than stay. From what I can see the original guys hired who wrote this code at the only ones who have sticked around.
So far seems a great company and a great salary. I can only thing that people are struggling with the source code and don’t hang around.
It is so difficult to follow the flow of the code and it’s taking me quite a while to complete simply tasks. Mainly because a lot of the time it’s goes into a Symfony black hole.
Is this normal for a Symfony project?
https://redd.it/1mr54vv
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community