News for hackers. Stuff that matters.
Re:How PHP's foreach works by objectified on Thursday February 28, 2013 @02:28AM (#5297560)
But why would you ask a question like that in an interview? What does it tell you about the person you're interviewing? Or does it tell you something about yourself?
Re:How PHP's foreach works by maratd on Thursday February 28, 2013 @03:12AM (#5297671)
> But why would you ask a question like that in an interview?

Simple. You want to find out if they spend their time on HN. There hasn't been a single discussion on HN about PHP that doesn't mention that arrays in PHP are hash tables. Not one.

Re:How PHP's foreach works by KMag on Thursday February 28, 2013 @07:20PM (#5302007)
It tests the candidate's ability to work on a vaguely specified problem and also gives them insight on how the candidate feels about working on a lot of poorly specified projects.

If the candidate is not smart enough to get up and leave the interview after being asked such a terrible question, you don't want to hire them. The company's actual business model is to sell the resumes of people who are smart enough to reject working there to companies looking for good coders.

Edit: confusing use of "their".