30 proven PHP Interview Questions for Experienced

PHP Interview Questions for experienced

So you are looking to hire a PHP developer? Great. But pay good attention because this is one of your most important hires.

This is the person who will be the face of everything virtual about your company. You need to make sure that you get the best fit and get it the first time around.

In this post, we will go through the skills, interview questions and suitable employment tests for PHP developer that will outline everything you need to do in order to find the best PHP developer for your business.

PHP Developer Skills Set

Most probably you will be knowing about all these skills already. So, if you know them already that’s good. If you don’t know what to look for in a PHP developer look for each of these skills and understand why they are important.

JavaScript, HTML, CSS and PHP

The candidate should have an in-depth understanding of JavaScrip, HTML, and CSS along with PHP. HTML is one of the most important skills that the developer should have. Your developer should know CSS and understand how it works, and how you can simplify the HTML layouts so that it becomes manageable. JavaScript for validations and to do some good things with your webpage (like lightbox, rating’s, Ajax).

SQL

This is the second most important skill that a web developer should have. When I say SQL I don’t just mean queries but also the database schema and intricacies of the database itself.

Frameworks

Check their knowledge of various frameworks like Codelgniter, CakePHP especially if you are working with an application that requires compatibility with PHP4, and ATK4, all of which are used to develop large-scale applications.

Others

Also check the developer’s ability to work with various available plugins, different databases and a variety of hosting options.

You can always have potential employees tested for their skills to know if they are suitable for your job role and if they can perform the job well. The best way to evaluate a PHP programmer for the job role is to give candidates a coding test.

Interview Mocha has a wide range of ready to use Online PHP Tests to assess & hire PHP developers. Quantify and assess skills of PHP developer with well-designed assessments by subject matter experts and spend time interviewing only relevant candidates.

Tests to measure coding skills of PHP developersSimulation-based PHP coding test proves to be the most reliable way of testing candidate’s PHP programming skills. Evaluate the knowledge of candidates applied skills gained through real work experience, rather than theoretical knowledge.

Interview Mocha provides simulation based coding tests that will enable you to measure the programming skills of candidates at all levels.

PHP programming skills test advanced level – assess the skills of PHP developer with 3 to 6 years of experience.

PHP programming test – Quantify the skills of PHP developer with 1 to 2 years of experience.

PHP assessment test – evaluate entry level candidates coding skills with basic PHP coding test.

PHP Aptitude Test – The PHP aptitude test helps you to assess the basics of PHP and identify potential PHP web developers by evaluating working knowledge of candidates.

Other related tests – Ask for any PHP skill concept of framework test, Interview Mocha has it all. Evaluate the candidate on each PHP related skills CSS skill test, HTML5 test, Joomla Online test, Zend PHP test, and SQL online test.

php programming test

PHP Interview Questions

Now here is the comprehensive list of application-oriented PHP developer interview questions for experienced to assess the working knowledge of PHP Developers.

PHP Interview Questions for experienced

1. How to achieve multilevel inheritance in PHP?

2. Difference between Zend framework 2 VS Zend framework 1?

3. How to pass data in header while using CURL?

4. What are the different tables (Engine) present in MySQL, which one is the default?

5. Explain the difference between MyISAM Static and MyISAM Dynamic

6. How can I retrieve values from one database server and store them in other database server using PHP?

7. What is the difference between if (‘value’ == $var) and if ($var == ‘value’)?

8. How can we prevent SQL-injection in PHP?

9. In how many ways we can retrieve the data in the result set of MySQL using PHP? What is the difference between mysql_fetch_object and mysql_fetch_array?

10. After the code below is executed, what will be the value of $text and what will strlen($text) return?

$text = ‘Mike ‘;

$text[10] = ‘Sam';

11. Consider the following code:

$x = NULL;

if (‘0xFF’ == 255) {

$x = (int)’0xFF';

}

What will be the value of $x after this code executes? Explain your answer.

12. What are SQL Injections, how do you prevent them and what are the best practices?

13. Suppose that you have to implement a class named Dragonball. This class must have an attribute named ballCount (which starts from 0) and a method iFoundaBall. When iFoundaBall is called, ballCount is increased by one. If the value of ballCount is equal to seven, then the message My name is John is printed, and ballCount is reset to 0. How would you implement this class?

14. What’s the difference between using mysql_ functions and PDO?

15. How can you enable error reporting in PHP?

16. How to use “MySQL in clause” for “string search” and “number search”?

17. Do you know what the PHP-FIG is? Describe it, describe the PSRs you know.

18. What are the reasons for selecting lamp (Linux, apache, MySQL, PHP) instead of the combination of other software programs, servers, and operating systems?

19. What will be the output of the code below and why?

$x = 5;

echo $x;

echo “<br />”;

echo $x+++$x++;

echo “<br />”;

echo $x;

echo “<br />”;

echo $x—$x–;

echo “<br />”;

echo $x;

20. What is wrong with this code?

class SomeClass

{

protected $_someMember;

public function _construct()

{

$this->_someMember = 1;

}

public static function getSomethingStatic()

{

return $this->_someMember * 5 // here’s the catch

}

}

21. How does one prevent the following Warning ‘Warning: Cannot modify header information – headers already sent’ and why does it occur in the first place?

22. Are objects in PHP 5 passed by value or reference? Explain

23. Why would you use === instead of ==? Explain

24. What will be the output of each of the statements below and why?

var_dump(0123 == 123);
var_dump(‘0123′ == 123);
var_dump(‘0123′ === 123);

25. How do you define a constant in PHP? How do you determine if a constant is defined in PHP?

26. When I open up a website you developed and it’s a blank white screen, what steps do you take to troubleshoot the problem?

27.  What classes would you create to build a basic Twitter-style status system with OOP?

28. Describe your experiences with web services.

29. Have you ever used a PHP framework? What frameworks are you experienced in?

30. What frameworks do you prefer? Why?

Repurpose a problem from a current project you have, and see how your potential hire goes about solving it. When interviewing candidates, ask broad questions (without looking for correct answers) to gauge both existing knowledge and the way a candidate thinks through a problem.

Conclusion

When you hire a developer you should be looking for skills that go beyond the computer screen. Choose someone who is passionate about the work and whose work is better.

Those given above are some of the major considerations for hiring PHP developer.There are a number of things we could have asked to find the right PHP web developer. What questions did we miss? What would you ask? Tell us in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>