I have a php developer interview? Any advice?
I'm still learning PHP, for almost 2 months. I have a good understanding of the basics. I've created some projects using laravel.the interview is a first round interview , any advice on what I should watch out for? Thanks.
12 comments
[ 2.9 ms ] story [ 34.5 ms ] thread- Do you know the magic methods? http://php.net/manual/en/language.oop5.magic.php
- Do you understand MVP and its value added? The fact that you use laravel may be an hint for a yes. Have you tried to do a bare PHP/MySQL application? You should, just to see how dirty it can be.
- Do you know and use var_dump?
- Are you able to write a Fizz Buzz?
- What's your knowledge about security stuff? XRSF / SQL injection / XSS
- Maybe some basic array manipulation involving array_keys, array_key_exists, array_shuffle.
- How would your test if a string is included in another one? The answer is of course using strpos but extra care has to be given to handle a FALSE return
- How to test for NULL, empty and FALSE?
- How would you do a key value iteration?
Tests vary a lot among employers and, in my case, I do not expect 100% good answers but it gives me a quick overview of your level.
Here what I usually check for in a candidate: - know your OOP (when to extend a class when to use composition, dependency injection, single responsibility principle) - Usually ask at explaining MVC - Ask about frameworks you've worked with (Symphony, Zend, Laravel, etc.) - Your ability to solve problems.
But mostly I look at your ability to solve problems and learn on your own. So if you dont know the answer to something, just let them know that Google and Stackoverflow are your best friends.
Good luck!
Knowing the gotcha's of the language is important, but a competent developer also understands patterns and disciplines.
For example, it's often times that DRY is perverted into a framework that obfuscates that actual work being done and makes not only the code untestable but also debugging a nightmare. It'd okay to repeat yourself as long as it provides clarity over obfuscation. But when is too much repeating too much? How would you fix it? Refactor? Rewrite? This perversion isn't exclusive to PHP at all.
On the PHP front, in addition to frantzmiccoli's great questions I would add the following: - have you installed and used xdebug? - you ever done code profiling with xhprof ?
Do not lie during an interview - if you don't know something, be honest and mention that you would do your research to figure it out.
That's exactly what I would answer and that would exactly be the reason why most companies won't hire me.
Google and SO are too valuable not to use sometimes, and for PHP, php.net is almost unavoidable.