PHP Reddit
31 subscribers
305 photos
40 videos
25.2K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Wall of Shame: 22% of PHP composer packages' disk space occupied by just 481 packages

**The Top 99.9 Percentile of Packagist.org packages by Disk Space**

Vendors who have projects that are 137.56 MB or more in disk space.

| vendor | repo_count | total_mb | total_stars | badness_score |
|---------------|------------|----------|-------------|----------------|
| themelogy | 55 | 2117.94 | 0 | 2117.9375 |
| correctch | 1 | 1838.14 | 0 | 1838.1406 |
| acosf | 2 | 8455.12 | 4 | 1691.0242 |
| azaw | 7 | 1541.30 | 0 | 1541.2969 |
| khandieyea | 5 | 2752.62 | 1 | 1376.3105 |
| rockmelodies | 2 | 1191.33 | 0 | 1191.3320 |
| triasigaka | 3 | 1130.77 | 0 | 1130.7695 |
| quatrain | 1 | 1127.27 | 0 | 1127.2695 |
| shakilahmmed | 1 | 1038.98 | 0 | 1038.9805 |
| mhinspeya | 46 | 867.81 | 0 | 867.8086 |
| simp | 14 | 611.33 | 0 | 611.3320 |
| queenco | 1 | 582.62 | 0 | 582.6211 |
| olcaytaner | 24 | 582.17 | 0 | 582.1680 |
| youdevcms | 1 | 556.47 | 0 | 556.4727 |
| centurion | 1 | 551.42 | 0 | 551.4180 |
| devarul | 1 | 550.79 | 0 | 550.7891 |
| pantech | 1 | 527.14 | 0 | 527.1445 |
| zfmaster | 3 | 519.66 | 0 | 519.6641 |
| vectorbross | 47 | 517.84 | 0 | 517.8359 |
| ing‑lib | 1 | 476.87 | 0 | 476.8711 |
| stampy | 1 | 466.27 | 0 | 466.2695 |
| ivan‑matthews | 3 | 465.25 | 0 | 465.2461 |
| order‑counter | 1 | 447.11 | 0 | 447.1055 |
| jsmarion | 1 | 438.70 | 0 | 438.6953 |
| coffeekraken | 1 | 416.82 | 0 | 416.8164 |
| phila088 | 1 | 416.44 | 0 | 416.4375 |
| zver | 22 | 408.09 | 0 | 408.0898 |
| pggns | 15 | 397.84 | 0 | 397.8398 |
| planet4‑rpg | 1 | 396.80 | 0 | 396.7969 |
| yalla‑ya | 2 | 1187.23 | 2 | 395.7448 |

* Disk space used by all (440,000+) of Packagist.org projects? **699,648 MB**
* Disk space used by Biggest 481? **163,425 MB (23.36%)**


Full report and more stats: https://github.com/bettergistco/PackagistArchive/blob/master/huge_vendors.md

Note: None of these packages are included in the Bettergist Packagist Archive + Civilization Bootstrap USBs. This shrinks total necessary space, after compression, from more than 300 GB to exactly 95 GB, a considerable savings.

This is because the majority of the disk space used by the Biggest 481 packages is occupied by already-compressed image and video assets.

https://redd.it/1spbhfn
@r_php
Pitch Your Project 🐘

In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.

Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁

Link to the previous edition: /u/brendt_gd should provide a link

https://redd.it/1spmssc
@r_php
When your first learn php what confuse the most ?

coming from go (I love golang) but I wanna do a little bit of freelancing so im doing some leetcode to understand php so I can learn lavarel and im not gonna lie im confuse by $ for local variable and params function (params function is variable underneath so it make sense ) and the array_push(references, ...values) and you what surprise or confuse you when you first learn php ? just started but php seems a little bit more complex than go am I wrong ?

https://redd.it/1spvhzm
@r_php
Planning to get back into writing Laravel content and would love some feedback on my direction

I've been building with Laravel for a while now and somewhere along the way I stopped writing about it. Life, client work, you know how it goes.

But I've decided to get back into it properly. I'm refreshing my site and starting to put out content that's actually useful for the Laravel community rather than just generic tutorial stuff that already exists everywhere.

My focus is going to be on:

1. Real world implementation patterns not just hello world examples.

2. Laravel with modern tooling like Livewire, Filament, and Inertia.

3. AI integration in Laravel apps which is something I've been doing a lot of lately.

4. Performance and architecture decisions for production apps.

I want it to feel less like a documentation mirror and more like something written by someone who's actually shipped Laravel apps and hit the real problems.

If anyone's curious the site is larashout.com, it's a bit bare right now but that's kind of the point of this post. I'm rebuilding it with intention this time.

My question for the community is what are you actually struggling with in Laravel right now that you can't find a solid answer for? What would you actually want to read?

I'd rather write ten posts that genuinely help people than a hundred that nobody bookmarks.

https://redd.it/1spt4l5
@r_php
Weekly help thread

Hey there!

This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!

https://redd.it/1sqgs0t
@r_php
I spent my senior year building a pure-PHP async ecosystem for PHP 8.4. Meet HiblaPHP

I'm a final-year IT student in the Philippines. Between classes, I spent months building a complete async I/O ecosystem for PHP from scratch. Today I'm releasing it as Public Beta and I'd love your brutal feedback.

It's called Hibla a Tagalog for "Fiber."

### Why I Built This

PHP was the first programming language I ever learned and loved. And for a long time, like a lot of PHP developers, I thought async was something that happened elsewhere in Node.js, in Go, in "serious" backend languages.

Then I found ReactPHP. It cracked something open in my brain. I realized async wasn't a language feature, it was an idea, and PHP was capable of it. I got obsessed. I wanted to understand it from the ground up, not just use a library, but build one so I'd truly know how it worked.

Hibla is what came out of that obsession. It started as a learning project. It turned into something I think is actually useful.


### What's in the Ecosystem

- Event Loop: Dual-driver (stream_select + libuv), with Node.js-style execution phases
- MySQL Driver: Pure-PHP binary protocol with side-channel KILL QUERY cancellation and deterministic LRU statement caching. No orphaned queries.
- HTTP Client: Async by default, full SSE support, and with full Http Mocking Simulator.
- Parallel: Erlang-style supervised worker pools that detect segfaults and OOMs and automatically respawn replacements
- Structured Concurrency: A strict 4-state Promise model that makes cleanup deterministic and safe

### The Core Idea: Fractal Concurrency

The design goal I'm most proud of: because every worker is "smart" and runs its own event loop, you can compose units of concurrency recursively. Parallel processes, async fibers, and raw I/O all interleave inside a single Promise::all() seamlessly.

$results = await(Promise::all([
$pool->run(fn() => cpu_heavy_work()), // Supervised pool task
parallel(fn() => sleep(1)), // One-off parallel process
async(function() { // Native Fiber, no spawn
$user = await(Http::get("https://api.example.com/user/1"));
return $user->json();
}),
parallel(function() { // "Hybrid" worker with its own Fibers
await(Promise::all([
async(fn() => await(delay(1))),
async(fn() => await(delay(1))),
]));
echo "Hybrid Done";
})
]));
// The entire block above completes in ~1 second



### Performance

To stress-test the foundation, I built a raw TCP responder using SO_REUSEPORT across the worker pool. It hit 116,000+ RPS on 4 cores. A real HTTP server will be slower, but this proves the core has virtually zero overhead.


### Standing on Giants

Hibla wouldn't exist without ReactPHP, whose work taught me how async PHP actually functions, and AmPHP, whose pioneering RFC work brought native Fibers to the PHP engine. I'm genuinely in their debt.

### Honest Caveats

- No dedicated docs site yet. Every package has a thorough README covering lifecycle events, trade-offs, and examples. It's not pretty, but it's complete.
- This is a Public Beta. I expect rough edges. That's exactly why I'm here.


I'm a student who built this with everything I had and honestly, I'm nervous hitting post on this. But I'd love your sharpest technical critiques: architecture, API design, edge cases I missed, anything. Don't hold back.

Here's the link to the main repository..

-> github.com/hiblaphp


https://redd.it/1sqifb0
@r_php
new DEMO website for VOODFLOW - Workflow engine for Filamentphp
https://redd.it/1sqjr55
@r_php
Vulnerability checks in packages

I was wondering how do you check for security issues within used packages/libraries. I use composer and I have a server script that runs daily 'composer audit' command and sends the results (if any), but I guess that depends on the author(s) of the package.


Any better approach?

https://redd.it/1sqkg7d
@r_php
Building a PHP runtime in Rust — what am I missing?

Hey folks,

I've been hacking on a PHP runtime written in Rust for a while now and I think I hit the point where I need outside opinions before I keep going. Not trying to sell anything here, just want honest feedback from people who actually put PHP in production.

Here's roughly what it does today:

Config / deployment stuff

one TOML file for everything (listener, TLS, workers, limits, logging)
virtual hosts
hot reload without dropping connections
Docker images for PHP 8.3 / 8.4 / 8.5, both NTS and ZTS
can build a single static binary with the app embedded

Execution modes

classic request/response (works like FPM)
persistent mode, where the app boots once and serves many requests
proper worker lifecycle hooks (boot / request / shutdown / reload)

Concurrency bits

shared table and atomic counters for cross-request state
task queue for background jobs
async I/O (parallel HTTP, non-blocking file stuff)
native WebSocket server, no sidecar process

HTTP / perf

HTTP/1.1 and HTTP/2 (HTTP/3 is on the roadmap, not done yet)
TLS with auto-cert or bring your own
gzip / br / zstd compression
early hints (103)
X-Sendfile
CORS out of the box
opcache shared across workers

Security

rate limiting
request size / header limits
IP allow/deny
CSRF helpers and sensible security header defaults
TLS hardening presets

Observability

Prometheus `/metrics` (requests, latency histograms, worker state, memory per worker)
health checks
structured JSON logs by default
a built-in dashboard showing live workers and requests

Compatibility

Laravel, Symfony and WordPress run unmodified
treating FPM feature parity as a release blocker, not a "someday"
Rust + tokio under the hood, PHP code doesn't change
core stays minimal, extras are opt-in

full features: https://github.com/turbine-php/turbine

Things I'd actually love input on:

1. Is a single-file config a win, or do your ops people hate that?
2. Which FPM features do new runtimes always forget and then bite you later?
3. What metrics do you actually stare at when something's on fire at 3 AM?
4. What extension combos would you want in a pre-built image?
5. What obvious thing am I missing from the list?

Happy to go deeper on any of these if anyone's curious.

https://redd.it/1sqiem1
@r_php
Lumen (API-only in Laravel) replacement?

I want to build a purely API in Laravel and Nissan Lumen. Is there anything comparable?

Since there will never be a front-end to this pulling in the whole framework is overkill.

https://redd.it/1sqri0f
@r_php
Live Walkthrough: What's new in Laravel Starter Kits w/ Wendell Adriel

The Laravel starter kits (React, Vue, Svelte, and Livewire) have had a huge run of updates recently, including team support, Inertia v3 support, and toast notifications.

I'll be going live tomorrow (04/21) at 12pm EDT (4pm UTC) with Wendell Adriel for a walkthrough of what's new. We'll also touch on Maestro, the orchestrator that powers how all the kits stay in sync.

Would love to see you there! If you have any questions, feel free to drop them here ahead of time or ask in chat during the stream!

Stream: https://www.youtube.com/watch?v=AbPSAt46Ja0

https://redd.it/1sr5s1e
@r_php