Page 1 of 1
PHP Test Questions
Posted: Wed Nov 15, 2006 9:32 pm
by Skeptical
I'm interviewing some PHP programmers and want to give them PHP test questions. Are there any that you guys can provide that will be great in testing a client's knowledge and also smarts? It will have to fit in a one hour interview, so we can only do some simple things. I'm thinking a sample project like:
create a database and write a small program to go through and ensure all entries in the "email" field are valid email addresses.
Something that will test their knowledge and also logic would be great.
Posted: Wed Nov 15, 2006 9:37 pm
by feyd
Why was this posted in Coding Critique? Moved to Enterprise.
viewtopic.php?t=43279 might be of interest.
Posted: Wed Nov 15, 2006 10:02 pm
by d3ad1ysp0rk
Just to chime in for this example:
create a database and write a small program to go through and ensure all entries in the "email" field are valid email addresses.
I'd hate to see that in an interview. The first part is extremely easy, but when you want to "ensure all entries in the 'email' field are valid email addresses", in a real world application, I would usually use a regex I already have that is rather close to the RFC for addresses (while still being compact enough to be reasonable).
Maybe you could ask more theory questions, or have a current programmer help interview them? I know when I went for my first programming job, the lead developer sat in and asked a few questions.
Posted: Thu Nov 16, 2006 1:03 am
by timvw
d3ad1ysp0rk wrote:Just to chime in for this example:
create a database and write a small program to go through and ensure all entries in the "email" field are valid email addresses.
I'd hate to see that in an interview. The first part is extremely easy, but when you want to "ensure all entries in the 'email' field are valid email addresses", in a real world application, I would usually use a regex I already have that is rather close to the RFC for addresses (while still being compact enough to be reasonable).
If i was doing that interview i'd simply that i (re)use a library to verify that e-mail address... But i wouldn't mind talking about regular expressions and showing them that i've got atleast a basic understanding of them... Anyway, simply talking about 'what is a valid e-mail address anyway?' could fill an hour
What i would want to see is that the developer can recognize (potential) flaws in a snippet... Before he can do that, he needs to understand the code (which means he needs an understanding of the language) and then he has to be aware of the http/mysql/... contexts he's working in...