[FONT="Comic Sans MS"]I've had my share of those over the years. Here are a few that come to mind:
Q. What is the difference between 'include' and 'require?'
A. A require halts program execution, while an include does not. Other than that, there is no difference.
Q. What is the difference between an echo and print?
A. None that I know of. (Some may "esoterically" argue this that echo is actually a function, while print is not.)
Q. In the following code what does the '@' symbol do?
$connection = @mysql_connect("localhost", $my_id, $my_password) or die($error_msg);
A. It truncates the full MySql warning to just the $error_msg text (so some hacker cannot deduce more information).
Granted, picky, picky, picky. When I can't remember the answer to a tricky phone screen question (don't you love those) I usually tell them I have a mind like Einstein. Yeah, Einstein was criticized because he couldn't remember his own phone number. He said, "Why should I when I can look it up?"
Seriously, are we paid to be memorizing zombies, or are we paid to know where to get the information that we need? I may not be "Data" from Star Trek, but I've got some pretty good reference materials. :rolleyes:
Hey, this is a great topic! Maybe we should start a regular section here, dedicated to tricky interview questions. 🆒
[/FONT]