I'm a developer at Facebook I thought I'd share my experience.
Before I joined, I wasn't really convinced by PHP. My experience using it was good for quick and dirty work but quickly resulted in a mess. However, the Facebook codebase was nothing alike.
The PHP stack uses generators to deal with async requests and doesn't suffer from callback hell. To write the UI, you write new custom components using XHP (XML in PHP). It heavily uses classes, traits, and most badly designed native php functions have a better counterpart available.
On the javaScript side, all the code is written using CommonJS modules. It runs a custom version of JSLint and Jasmine for unit tests. React as the main framework. We also have source transform for ES6 classes, arrow functions, spread operator ... It definitively feels at home for any node.js person :)
"The PHP stack uses generators to deal with async requests and doesn't suffer from callback hell."
This is one of the problems with the Node hype; it claims to be this unique and special snowflake, when in fact pretty much any similar language (Perl, Python, PHP, Lua, etc.) has just as much stuff working for it. Even the "but our libraries are 'designed' for async!" isn't as big of an advantage as is claimed, since in many cases the other languages have good libraries too. (Or in the case of something like gevent, a reasonable ability to convert libraries to async.) It's really a throwback, not the awesome step forward it claims to be.
Before I joined, I wasn't really convinced by PHP. My experience using it was good for quick and dirty work but quickly resulted in a mess. However, the Facebook codebase was nothing alike.
The PHP stack uses generators to deal with async requests and doesn't suffer from callback hell. To write the UI, you write new custom components using XHP (XML in PHP). It heavily uses classes, traits, and most badly designed native php functions have a better counterpart available.
On the javaScript side, all the code is written using CommonJS modules. It runs a custom version of JSLint and Jasmine for unit tests. React as the main framework. We also have source transform for ES6 classes, arrow functions, spread operator ... It definitively feels at home for any node.js person :)