r/PHP • u/Tomas_Votruba • 3h ago
r/PHP • u/brendt_gd • 5d ago
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!
r/PHP • u/brendt_gd • 28d ago
Who's hiring/looking
This is a bi-monthly thread aimed to connect PHP companies and developers who are hiring or looking for a job.
Rules
- No recruiters
- Don't share any personal info like email addresses or phone numbers in this thread. Contact each other via DM to get in touch
- If you're hiring: don't just link to an external website, take the time to describe what you're looking for in the thread.
- If you're looking: feel free to share your portfolio, GitHub, … as well. Keep into account the personal information rule, so don't just share your CV and be done with it.
r/PHP • u/nyamsprod • 5h ago
URI Matching and Data extraction in the new league URI toolkit 7.9
nyamsprod.comr/PHP • u/TheRayCoding • 3h ago
Selection of the phpchat project by the XERJ team
github.comMy project phpchat, has been selected by the XERJ team for inclusion in Corpus Hub.
XERJ is a public collection of practical coding solutions designed to help developers utilize real-world implementations.
The reason our project was likely chosen is that the "mention users with username" feature which includes autocomplete, highlighting, and notifications is a comprehensive and functional implementation, rather than just a simple, basic feature.
This time, a portion of my project's code will go on to help even more developers!
Screenshots:
r/PHP • u/General_Sun_8180 • 21h ago
I needed a Basis Universal PHP extension for a side project, so I built one in Rust
Hey everyone!
I was working on a side project that needed to compress images into GPU-friendly texture formats, particularly KTX2, directly from PHP.
I wanted to use Basis Universal, but I couldn't find a PHP extension that suited my needs. Rather than introducing a separate CLI-based workflow into my project, I decided to try building an extension myself.
That's how BasisU came to be.
To be clear, the actual compression technology is provided by the Basis Universal team. Their native C/C++ library does the heavy lifting — my project is simply a Rust-based PHP wrapper that exposes some of its functionality to PHP.
The extension currently provides:
- Image compression directly from PHP.
- Support for Basis Universal texture formats and KTX2 output.
- Configurable encoding parameters, including quality, effort level, texture format, and mipmap settings.
- PHP stubs for IDE autocompletion and static analysis.
- Prebuilt Linux binaries installable through PIE, as well as the option to build from source.
A few important caveats:
This is an experimental project, and I wouldn't recommend using it in production yet.
It's also my first public project written in Rust. I'm still learning the language, and while I've managed to get the extension working, I don't have an in-depth understanding of all the underlying compression algorithms and their domain-specific details. The current implementation covers only part of the functionality available in the original library, and there's still plenty of room for improvement. There is no automated test suite at the moment, either.
That said, I intend to maintain and improve it because I need this extension for my own project. So this isn't something I'm publishing and immediately abandoning — I'll keep working on it as my needs evolve and as I learn more about Rust and Basis Universal.
If you're interested, here's the repository:
- GitHub: https://github.com/alien1225/basisu
- Packagist: https://packagist.org/packages/alien1225/basisu
I'd appreciate feedback, especially on the PHP API design, the Rust extension implementation, and anything I might have overlooked when wrapping a native library.
Thanks for reading!
r/PHP • u/Ottomatica • 1d ago
Upgrading a site from PHP 5.5 to 8.x
Hey all,
I have a personal website the I built nearly 20 years ago and I would like to update it to the latest version of PHP. It's a simple website that I use to run tournaments where I basically just enter tournament parameters (dates, time locations etc,) and tournament results and it displays all of the data that people care about like schedule, results, leaderboards, historical stats etc. All the data is stored in a MySQL database.
I basically built it from scratch without an IDE.
Searching on this sub, it seems like rector may be the way to go. I do actually have PhpStorm and have configured it with composer and rector.
I guess my big question is how would you go about the update? My site is on a paid hosting platform.
I'm thinking that the best way would be to have a local host on my development PC and duplicate my website there to make updates before testing on the external host.
Thoughts?
Edit:
Thanks everyone for all the options/opinions, very helpful!
r/PHP • u/Glum_Course_5468 • 1d ago
I built a desktop app in PHP: Stargazer 0.10
For the last year or so, in my spare time I've been researching how to use PHP differently. Laravel as a stack has been pretty good to me, and I've wished there was a Laravel-like way to build desktop apps, apps that spoke to integrated circuits, and even games. I kept structuring my Godot experiments like they were Laravel apps. After all that tinkering, I realized what I really wanted was a unified, yet decoupled stack, that could (or atleast attempt to) build all the apps I wanted beyond the ones meant for a web server, in a syntax I could actually read.
So Ive been building that stack. I've called it the VenusianPHP Framework: a Laravel-like framework for building apps that don't deploy to a web server (unless you want to build a web server!). I plan to break that down in another post, but it's been going very well. To the point that I can pretty easily spin up native toolkit windows with AppKit, GTK and Qt on macOS, Debian and Ubuntu with just a few lines of code and a a couple of config keys..
To keep track of what I know this stack can do, I started building an app as a showcase of what PHP can do, at a minimum, when it comes to these kinds of apps. I call it Stargazer. Under the hood it uses a package I wrote for the framework that talks to NASA public APIs and visualizes the data. It's now on Github: https://github.com/venusian-scrapyard-presents/stargazer .
You can read the source, install it via Composer (you'll need a few extensions, all installable with PIE), or grab the compiled builds from the release: a .dmg for Apple Silicon Macs and .deb packages for arm64 and x86_64 Linux. I've run them on my Raspberry Pi 5s, my Jetson Orin and a gaming PC that dual-boots Linux. No PHP runtime required.
I plan to keep shipping new versions to show off more of the stack as I build it, as far as Windowed applications go. I found this one pretty satisfying to write (I did use AI assistance, but a good chunk of the source is code I wrote by hand). I'd love UX feedback, bug reports from anyone who tries it, or any questions in general. Or just give it a star if you thought it was interesting!
r/PHP • u/Cultural_Yoghurt_784 • 2d ago
Warning: Latest PEST is bugged. Silently skips PHPUnit tests
We'd been having some weird issues with our tests in CI. Just saw this:
https://github.com/pestphp/pest/issues/1965
v5.3.2
The new time-balanced sharding with parallelization silently skips all PHPUnit tests
eg. `vendor/bin/pest --parallel --processes=2 --shard=1/2`
r/PHP • u/usamamuneer • 2d ago
One PHP config now compiles to GitHub Actions, GitLab CI, Bitbucket Pipelines and CircleCI
I kept maintaining almost-identical pipelines on two providers and watching them drift.
Slipway compiles config/slipway.php to the YAML for every driver you enable. A slipway-guard job fails CI if the committed YAML no longer matches the config.
Tiny example:
'drivers' => ['github' => true, 'circleci' => true],
'php' => ['8.4', '8.5'],
'stages' => [
'quality' => ['pint', 'larastan', 'composer-audit'],
'test' => ['matrix' => true, 'steps' => ['pest' => ['services' => ['mysql']]]],
],
https://github.com/usamamuneerchaudhary/laravel-slipway
If you actually run CircleCI for Laravel, I'd like to know what the generated config.yml gets wrong.
r/PHP • u/TheTreasuryPetra • 2d ago
News Markdown extracted from PDFs using prinsfrank/pdfparser now includes Links!
github.comr/PHP • u/elizabethn • 3d ago
How the PHP Security Team Handles Your Reports
thephp.foundationIn our latest blog post, Alexandre Daubois shares how the PHP Security Team operates, how your security reports are triaged, and how you can do your part to help PHP be more secure. https://thephp.foundation/blog/2026/10/14/how-the-php-security-team-handles-your-reports/
Stewart - Write automations in PHP. Because you can
Hi Everyone,
If you familir with Home Assistant, an open source home automation software, i want to share a project, that i'm working on recently.
Are you interested in depth release announcement and backstory? Read it on the home assistant forum: https://community.home-assistant.io/t/stewart-write-automations-in-php-because-you-can/1028750
I want to ask you that if you like the project, give it a star on GitHub. Cheers.
Where to find it
r/PHP • u/Glum_Course_5468 • 3d ago
epoll or kqueue with your stream_select
Ive pretty much spent the majority of 2025 and 2026 learning how to use PHP differently. Web page serving and cli commands are not enough for me, lol. Don't get me wrong Laravel's great. The stack I use on top of it's been paying the bills since before COVID. And I will be honest, (and will def die on this hill this far into my career that) no body that's got time to spend learning, is learning C. And I don't like Python. It doesn't deserve to have the clout it does when PHP can do most things faster, or would if that functionality was there!
So on my journey of bringing GPIO, kernel-space bridges, and gpu support to a language that deserves more, I learned a couple of new and exciting things about resource file descriptors, how they block or dispatch and how they play roles in nonblocking event loops. I learned that PHP's most available option, when even trying to work with async IO, is stream_select(). ReactPHP uses it for timer resources, and Laravel Reverb uses it when your server isn't using ext-uv (an opinionated implementation of Javascript's nonblocking event loop). But stream_select has a lot of limits I ran into during my research. I learned that languages with direct kernel access run their event loops with epoll on Linux and kqueue on MacOS.
Now I'm of the mindset that FFI is only good for experimenting and not something that you would want to build and publish. I could be wrong, but if an extension can do it instead, I'm down. Now I know how to code some extensions in zephir, but lets be serious, if we are going to bind epoll and kqueue to PHP, we gotta get down to that nasty nasty C. I may not be good at C, but those coding agents we all use def are. So i did my fair-share of pre-respect my authori-claude verbal harrassment to get exactly what I wanted, which was a 1-to-1 binding of the epoll and kqueue libraries.
In a C app you invoke epoll with
fd = epoll_create1(EPOLL_CLOEXEC);
In a php app, you'll invoke epoll with
$fd = epoll_create1(EPOLL_CLOEXEC);
It works just like that. No opinions, just bindings. I actually forked Laravel Reverb and replaced its ext-uv implementation with my epoll extension making it a literal drop-in replacement for Reverb, with some really nice performance gains when using stream_select or epoll/kqueue.
I invite any one interested to try out the extensions. It's installable with PHP PIE, is compatible with NTS and ZTS builds of PHP 8.4+, or you can clone it and build it with the included installer or use phpize directly. It also includes a little Pest v4 test suite you can run if you clone it in manually.
The repos are here:
epoll
https://github.com/php-io-extensions/epoll
kqueue
https://github.com/php-io-extensions/kqueue
posi (to open all the fds PHP won't + ioctl, ooooh a footgun :D )
https://github.com/php-io-extensions/posi
Project Saturn Forte (Reverb with epoll/kqueue)
https://github.com/projectsaturnstudios/forte
I would love to hear thoughts or concerns, wtfs and omg AI slopz.
Have a lovely time of the day of where you are!
r/PHP • u/ericbarnes • 4d ago
News I built a news site for the whole PHP ecosystem. Looking for feedback.
I’ve been running Laravel News since 2012. For years, I’ve wanted a place that covers PHP as a whole, not just one framework, and Matt Stauffer and I finally built it: phpnews.net
What’s on it right now:
- RFC tracking, so you can see what’s in draft, under discussion, and up for a vote
- PHP version info and support dates
- News and articles from across the ecosystem: internals, frameworks, packages, tooling
- Community events
- A newsletter if you’d rather get a roundup than check the site
It’s been running quietly for about a month to work out the kinks. Coverage comes from a lot of feeds I scan daily, plus posts I think would matter to you as a PHP dev.
What I’d really like to know:
- What sources or projects am I missing?
- What would make this something you’d actually check regularly?
- Anything broken or annoying?
Happy to answer questions.
News SimpleStats is now open source: server-side analytics for Laravel that ties revenue back to your campaigns
Hi folks,
I've got some news I've been wanting to share for a while: SimpleStats is now open source (AGPL-3.0). The complete app, the same code that runs simplestats.io, is on GitHub.
Quick recap for anyone who hasn't seen it: SimpleStats is a server-side analytics tool built for Laravel. Instead of a JS snippet, it tracks visitors, registrations, logins and payments through Laravel itself (middleware, observers, event listeners). So ad blockers can't touch it, and it can tie every payment back to the UTM campaign that brought the user in. Think revenue per channel, MRR, retention cohorts, campaign ROI, not just pageviews.
Why open source? Mostly trust. An analytics tool that sees your signups and payments shouldn't be a black box. Now you can read exactly how visitors are counted, how bots are filtered and how revenue gets attributed. And if you spot a bug or miss a metric, you can send a PR.
For teams that can't send user or revenue data to a third party, it can also be self-hosted. It's a regular Laravel app (Laravel 12, Inertia + Vue, PostgreSQL). No open-core split: the self-hosted version has every feature and no limits on projects or events. The hosted version with its free plan stays the easy way if you'd rather not run servers.
Repo: https://github.com/simplestats-io/app
Announcement with the details: https://simplestats.io/blog/simplestats-is-now-open-source
I'd love to hear your feedback, and PRs are very welcome. Happy to answer questions about the code or the decision to go open source!
r/PHP • u/davorminchorov • 3d ago
Article Reviewing Ergodnc - What a Clean Laravel API Still Gets Wrong
codyssey.devHey all,
I wrote 5 advanced code-heavy articles on how I prefer to review code with a specific rulebook and how I would refactor them myself for better long-term maintainability.
This is the main article that shows the idea while the 5 links are inside.
Let me know what you think about this type of content and if it is useful to you.
r/PHP • u/USSBecca1701 • 4d ago
2027 State of Open Source Survey
research.netHello! I wanted to share that the 2027 State of Open Source survey is now open. All provided data will be kept anonymous, and it only takes about 10 minutes to complete. The findings will be shared in a completely free report next year, and every 500 responses = an increased donation to Black Girls Code.
As a disclaimer, I am a member of the marketing team at Perforce, the main sponsor of this survey. I'm posting here because we are trying to reach as many OSS users (including PHP) as we can. If you have any questions, I'm happy to send them on to my team for answers.
¿ Ya se están usando interfaces con propiedades ?
Hola, una pregunta que lleva hace un día en mi cabeza:
Desde la llegada de interfaces con propiedades en php... ¿ esta característica a sido implementada por muchos de ustedes ?
r/PHP • u/InstructionAway1383 • 4d ago
Framework-agnostic Aadhaar Offline e-KYC and Secure QR verification for PHP
I split the core out of my Laravel package so any PHP 8.3+ app can use it (Symfony, Slim, CodeIgniter, WordPress, plain PHP). Runtime dependencies are PHP extensions and robrichards/xmlseclibs, nothing else.
$reader = OfflineKycReader::create(certificates: ['/path/uidai_offline_publickey_2026.cer']);
$kyc = $reader->verifyZip($path, $shareCode);
Some details PHP folks might find interesting:
- the Secure QR is a big decimal number holding GZIP data; conversion is pure PHP (no GMP/bcmath), cross-checked against GMP
- unknown QR versions are rejected instead of guessed, because a misread layout would still pass the signature check
- architecture tests keep src/ free of framework code
- Testing\Fixtures builds signed synthetic ZIPs, XML and QR codes at runtime, so no real data is ever committed
https://github.com/itxshakil/aadhaar-offline
Not affiliated with or endorsed by UIDAI.