Directory that lists employee information
The answer is that there is a definite performance gain in having it all in a single join. Just the reduction in back and forth should greatly decrease the latency, and the database engine should be way more effective.

For a more general view on that topic :


Will the request be hard to understand later ? This is the most important question, as it will be the difference between maintainable code and code nobody will dare touch. In this particular case, I would say there is an obvious request to write, and that it will be fairly easy to understand. If you don't feel this is the case, then you probably should not go this way (premature optimization, etc.).
How complex will be the whole solution ? Displacing logic from PHP to SQL is often a good idea, but might have drawbacks :


hidden logic (triggers, or opaque stored procedures) that is hard to understand later
vendor lock-in (when using advanced features that are not standard).
poor performance : with complex queries, it becomes hard to evaluate the run-time performance


It seems to me that a straightforward 5 tables join is far from complex, and is a lot less ugly than the PHP code displayed here. You would get rid of all the content of the while loop ...
How much will the performance be impacted ? For a low-traffic web application, which is the most common case, this should be the last concern.