PHP Test Questions

Express the business side of your digital lives. Share your experiences and/or your comments regarding a business or organization.

No advertising.

Moderator: General Moderators

Post Reply
Skeptical
Forum Newbie
Posts: 8
Joined: Mon Sep 18, 2006 10:23 pm

PHP Test Questions

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Why was this posted in Coding Critique? Moved to Enterprise.

viewtopic.php?t=43279 might be of interest.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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 :P

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...
Post Reply