(no title)
evunveot | 6 years ago
By the standards of early 2004 (when Facebook was originally written) this is still mediocre PHP. People who cared about writing good PHP were reading magazines like this (2003):
https://www.phparch.com/magazine/2003-2/june/
and having discussions like this (2004):
https://www.sitepoint.com/community/t/to-hopefully-clear-up-...
They knew global variables and hundreds of lines of top-level code were bad PHP, they just didn't know yet that trying to ape Java wasn't good PHP. If I remember correctly, DHH came out of this period: he got so sick of enterprisey PHP that he jumped ship to Ruby and wrote Rails. That was 2005.
Fair enough that Facebook hadn't done a major rewrite by 2007, but still: not good code.
No comments yet.