Facebook has almost certainly the world's largest codebase in any PHP-family language (Hack, which is essentially PHP + gradual typing + a better standard library, but still very much PHP-flavored). The code is fine.
Part of the reason is the improvements of Hack over PHP, part of the reason is very aggressive linting (to, e.g., enforce the use of types), and part of it is probably that Facebook doesn't hire for "PHP positions", but for generalist software engineers.
Part of the reason is the improvements of Hack over PHP, part of the reason is very aggressive linting (to, e.g., enforce the use of types), and part of it is probably that Facebook doesn't hire for "PHP positions", but for generalist software engineers.