Why hasn’t Facebook migrated away from PHP?
The flavor of PHP we use at Facebook, Hack, is very far removed from the what you typically think of when you picture PHP. In almost every way it has been ahead of JavaScript. We’ve had static typing, generators, async/await, tuples, anonymous functions, classes, and XHP (basically React) for a long time, often years before they were available in Node. As a result our Hack codebase is very close in spirit to a modern JS application.
..
The reason that Facebook invested so heavily in Hack is that we have an absolutely massive codebase. We’ve favored a monolithic repro over loosely coupled services. Switching technologies would have been an all or nothing effort, and even more costly than adapting the language and incrementally adopting features over time.
.. Folks, Facebook users don’t give a crap about what’s behind the scenes. The real question is: does it work? If yes, why change it? Just because everybody is riding the Node.JS hype train? Are the users leaving FB because they don’t use Node?This type of questions reflect how broken developers mindset is. Focus on providing value to your business. If it solves the problem, nobody cares what technology stack you’re using…