pretty sure the NSA doesn't work in php. probably c++. i wonder what they use for their databases. could be fun working on their stuff, although not sure i like the idea of govt pay grades.
facebook is all C++ as well. php is only at the very edge of the presentation layer.
there were some interesting slides which sort of hinted at what the NSA was using for data analysis . . . it looked like they were using in-memory nosql databases heavily. and yes, they don't pay for crap. you can (or could) make decent money there as a contract employee working for a third party like Northrop but those days may be ending soon.