PHP is a language famed for some of its idiosyncrasies, oddities and strange behaviours. As we speak to those in our networks and potential candidates, a familiar question arises: "Why PHP?" (Or, the cheekier individuals might laugh!)
So, let's address the elephant in the room. Why has Mention Me picked PHP as our core platform language? Why do we enjoy it? What do we wish would change?
And perhaps most importantly, will the future of Mention Me be entwined with PHP?
To begin, let's wind the clock back. Many moons ago, Mention Me was born as a business idea by Andy and Tim (our co-founders) during a trip to the pub.
Tim, our CTO, was looking for the right tool for the job: to build and prototype a new way of doing referral marketing.
As any developer knows, there are a hundred and one different choices for technology. From frameworks, to languages, to services — we really are spoilt for choice 🤔
When we first met, I remember Tim recounting to me that he kept coming back not to PHP, but to a framework: Symfony.
Symfony has a wide range of plugins and capabilities. It’s easy to get going and has a large, helpful community. Plus, despite having previously been a Java developer, PHP was a language Tim had been familiar with in the past.
Sure, it's not the hip new kid on the block. It's not famed for its scalability (more on that later) or speed. And it certainly has some odd behaviours (you can enjoy a long — and fair — rant on the subject on the eev.ee blog if you so desire).
But what it enabled Tim to do was to prototype, to iterate quickly and to learn.
And that's how we began our journey with PHP and the Symfony framework.
Mention Me has grown from there. We're a little beyond the "two men in a pub" stage of the business.
We recently closed our Series B, and while we've added more technologies like Typescript, React and Python, we still have PHP and Symfony at our core.
The world has changed a lot since we started. PHP has grown up significantly.
Since the first prototype, we've seen four new major versions of Symfony and two new major versions of PHP.
These have brought speed, performance, and reliability. And what Symfony calls "DX": Developer Experience.
We love the dependency injection behind Symfony, which allows for easy service configuration and straightforward test building.
PHP is simple to scale up too — we have many individual autoscaling services that come and go with our traffic.
And while most developers have played with NPM, Composer is just as rich on the PHP side too. It’s got an awesome community of developers adding improvements or new libraries every day.
The PHP upgrades have brought with them significant performance benefits. Each upgrade, from 5.5 through to 7.4 (our current version), has delivered capabilities that make writing bulletproof PHP easier — and more enjoyable.
PHP was famous for being "loose" and "forgiving" about what was allowed as valid code, but one of the biggest steps the PHP community has taken recently is to move to a solid type system.
It's now easier than ever to test and iterate on our code thanks to typing, and without a sacrifice in performance too. Tools like Psalm and Rector also help to monitor and refactor our code.
Plus, we're soon to move to PHP 8, which will bring another healthy performance boost. (Sure, it's not C fast, but nor do we need to be).
We aren't using the same PHP we built my first Wordpress site on (the YorkVision.co.uk student newspaper, if you were wondering!).
We're a company with over 100 employees, a Series B round, a growing 30-person Product & Engineering team and over 100 million users.
While I'm proud of that little Wordpress site, to compare them would be like comparing Liverpool FC with an experience playing in the Under 14s: it's more than leagues apart.
The requirements of your average PHP site, while admirable, are rather simple: serve content in a way that's fairly easy to edit and get out of the way. In fact, the original aim of PHP (created by Rasmus Lerdorf back in 1995) was to do just that.
We're a few years on from 1995 now, and from that tiny seedling a giant oak has grown.
PHP has come on leaps and bounds from its origin, and the team behind it has done a wonderful job of shaking out the cobwebs and laying a foundation for the future.
PHP helps us serve the majority of our requests in <150ms. We can iterate and deploy easily, and we've built a majestic monolith which is well-structured, well-tested and maintainable.
(Okay, so truth be told, there are some bits of our platform which are a bit grim 😬 It's not all sunshine and rainbows. But that's our fault, not PHP's fault. As it turns out, referral’s a bit more complicated than it looks on the surface!)
We're serving hundreds (nearly thousands) of requests a second globally, and our product is reliable and stable.
Yes, we could’ve done it in Java, or C#, or Node (or whatever HackerNews proclaims is the hot new thing this week). Yes, we’d love it if certain things were simpler or more effective,but the real challenges we want to focus on are those at the core of what we do: referral.
PHP and Symfony both do a wonderful job of letting us iterate, experiment, move quickly, and (just as Rasmus set out to do in '95) get the tools out of the way.
We're not very active in the PHP community, but we've come to have huge appreciation for the community that supports and runs PHP, Symfony and the other major technologies and frameworks.
From the corporate sponsors like JetBrains, to the community of stewards at both PHP and Symfony — and all the smaller maintainers beyond — we're proud to be part of this community.
We're excited about where it will go, and we're proud to build our product upon it.
Our future is as yet unwritten, and it'd be brave to make too many sweeping statements about our technology of the future. But from where I sit today, I can be confident of some themes:
PHP will play its part for years to come, but it won't be the only tool in our toolbox.
Today we're using React, Typescript and GraphQL extensively to power our UI. (Yes, the GraphQL platform is powered by PHP, Symfony and the overblog/GraphQLBundle).
We see a future in {Type/Java}Script on the backend too, as we explore Lambda@Edge and how we can deliver the best experience to our users.
Our Data Science team is just starting out (did I mention we're hiring?) and Python has become lingua franca in that area, so we'll be reaching for that as we embark on creating a smarter platform.
And there are certainly areas where PHP doesn't seem fit for purpose too:
PHP does lack some of the enjoyable primitives regarding asynchronous programming that Golang, Rust and others have built.
And for high-performance parts of our platform, we may want to move to a compiled language for raw speed.
Or perhaps, as time has shown, PHP shall evolve to improve, to grow and to solve our needs.
We hope you enjoyed this blog about our choice of PHP. We've covered the best part of a decade of history in a comparatively short blog, so it’s pretty unlikely that we've answered all your questions.
We'd love to hear what you think — can we persuade you to come over to the "dark side", or have we missed anything you wish you knew about PHP?
Reach out to us via the form below, or visit our careers page to learn more about the roles we're actively hiring for right now.
We welcome engineers of all talents and backgrounds. And we don't think you need to be an expert in PHP or Symfony to be successful at Mention Me — our interview process is about engineering, not about PHP.
You bring the engineering talent, and we'll help you adjust to PHP, Symfony and building an awesome product 🤘