PHP at Scale #11
Welcome to the eleventh edition of PHP at Scale. I am diving deep into the principles, best practices and practical lessons learned from scaling PHP projects — not only performance-wise but also code quality and maintainability.
This month, due to the holiday period, I won’t focus on any particular topic, but I gathered some useful posts I came across in the last 30 days. Feel free to add interesting articles in the comments, or share a topic you would like to be covered in the next releases.
JetBrains did a great job with organizing PHPverse this year. They had both a great agenda and a nicely organized studio. Looking at the talks, you can clearly see the direction for PHP in the upcoming years. Making it faster, easier to extend, and a perfect tool to use with AI. You can view the selected talks for free.
And even more important, the second part of it. I struggle a bit with the FrankenPHP benchmarks, as we have not been able to make them work in our projects so far. However, after discussing with other teams/companies, it appears to be a very appealing option for tuning performance. I have a feeling it starts to be a bit of a “hype driven” solution, so be aware of the downsides of it. Not all releases are “production” stable in my opinion, although it gets better with time. If you decide to give it a try, remember to set it up in worker mode.
One last comment: I often see people optimize CPU/RAM, while IO is the issue. Keep in mind that even the fastest web server won’t fix your project if the SQL queries are slow ;)
If you have a friend who still thinks about PHP in terms of how it looked 10 years ago, this might be a good article to share with him/her. As PHP developers, we need to somehow turn around the popular opinion and attract more companies and developers to our ecosystem.
Nice to see yet another initiative in the AI area. Since my post on AI in PHP, quite a lot has changed. Neuron seems to get more traction, and there are lots of different MCP server libraries. I am a huge fan of MCP - not in terms of how it is designed, but it’s really great to have a protocol that will be used by all major players.
So far, it was (and still is) a bit tricky to select the right library. There are many libraries, and it is hard to say which one will be maintained. Better keep this in mind, and build a layer of abstraction on your side. Nevertheless, I assume the Symfony AI might be one of the stable, maintained libraries. At least I hope so ;)
Probably not something you will use, but I still find it fascinating that you can build 2D and 3D games using pure PHP. Not sure if it makes sense, but nice to have that option.
More practical than the one above, NativePHP offers developing both desktop and mobile apps with pure PHP. Interesting to see how this evolves, as we already have Expo, which has a lot of adoption, and Ionic, that is already on the market for years. Yet, NativePHP is the first option for PHP, so some teams might prefer it over the other options. So far, I haven’t met anyone who would use this, but good to keep an eye.
SaaS with PHP: Libraries or Roll Your Own Multi-Tenancy
After the last newsletter release on multi-tenancy, I’ve started a discussion on Reddit to check what people actually choose when they work on SaaS. I have to say I was a bit surprised that most people tend to roll out their own approach, similar to what we do. I initially assumed more people use the out-of-the-box solutions.
That’s it for this “holiday” release of my newsletter. If you have found something interesting, do not hesitate to share it in the comments.
Why is this newsletter for me?
If you are passionate about well-crafted software products and despise poor software design, this newsletter is for you! With a focus on mature PHP usage, best practices, and effective tools, you'll gain valuable insights and techniques to enhance your PHP projects and keep your skills up to date.
I hope this edition of PHP at Scale is informative and inspiring. I aim to provide the tools and knowledge you need to excel in your PHP development journey. As always, I welcome your feedback and suggestions for future topics. Stay tuned for more insights, tips, and best practices in our upcoming issues.
May thy software be mature!