Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I test PHP skills in a interview?

Status
Not open for further replies.

abigailscotty

Programmer
Jun 2, 2014
3
IN
My company needs to hire a PHP developer, but nobody has PHP knowledge in my company and we find difficult to test for PHP skills. If it were a C/Java developer I would ask him to write a quick implementation of the Game of Life, but PHP is a completely different language.

I saw this test with interest:


Anyone else has more suggestions?
 
If it can be written in Java, chances are it can be written in PHP easier and faster.

In any case, the question yon need to ask is what do you need the person to know? What are they going to be doing with PHP?

Do they need to know OOP? do the need to be skilled in Regular Expression writing? Database Handling?

The test in the page you linked to is extremely basic, and mostly designed to make you stumble and actually get it wrong, rater than testing how much you now. Several of the questions would issue Warnings when run which is never a good thing in a test. You want to ascertain how much the person knows, not how hard it is to stump him with strange question that does not have much real world application.

Here's a test I wrote a while back when I was needing to hire a PHP programmer. Its short, but to the point if you are looking for OOP knowledge. Should be finished in about 1 hour or 1 hour and a half.

Using the following variable assignment what will be echoed out in each case:
$var = ”Hello World”;

a) echo '$var';
b) echo $var[0];
c) echo ”$var”;

If a user submits a form where can I find the submitted values in PHP?

Using the following array, write the necessarry code to print the contents to screen in a html table.
$arr = array(
0=>array(
"name" => "John Doe",
"position" => "General Manager",
"description"=>"In charge of Operations an Management"
),
1=>array(
"name" => "Robert Smith",
"position" => "Sub Manager",
"description"=>"In charge of Financial resources and company assets"
),
2=>array(
"name" => "Mark Jones",
"position" => "Human Resources",
"description"=>"In Charge of Personell Management and Hiring"
)

);

What do the initials MVC stand for?

Define an employee class based on the information in the array of question 3. The Class must have a method to create an employee, and another one to print an employee's information.

What is the main difference between a public, a private, and a prtected property like the ones below?
public $name = null;
private $password = null;
protected $secureKey = null;

What does the variable $this do in OOP?

What purpose do the the $_SESSION and $_COOKIE variables serve in PHP?


What is the following line of code doing?
$var = isset($_GET['param']) ? $_GET['param'] : null;









----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
one of my clients uses a battleships game as the interview test. I posted about it here: thread434-1730062

 
@Phil
i'd say that if your test were not finished in 20 mins or so the candidate may not be the one you're looking for if it's necessary that the person work autonomously.
 
True, I was looking for a specific skill set there. Probably the code writing for the class may take a bit longer if they are very detailed wit the class. But your right. it should be done in a very short amount of time.

Also I took off a couple of other questions that were much more specific to the tasks at hand when I wrote it. Like $_SERVER headers, and USER AGENT matching.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Personally I think asking a coder who you want to write applications to query databases, interact with the user and number crunch, to write a game as a test is totally wrong.

I have written countless desktop apps in VBA/VB6 , I have developed too many to count websites, integrated applications, extranet apps, the list goes on for over 15 years.

Ask me to write a game, forget it, I don't do games, I don't think like a game coder and nor do I want to.

Game coding it a completely different kettle of fish to any other type of coding in my mind, and if you are going to ask non-game coders who you require to write non-game applications by expecting them to write a game, you are quite possibly going to end up with the wrong employee!

If I go for a job interview as a coder and I am asked to write a game as a test - I don't want the job!

You don't test a bricklayer by expecting them to do carpentry!

Of course YMMV!


"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top