Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
I have a php developer interview? Any advice?
7 points by ecuanaso on Dec 17, 2014 | hide | past | favorite | 12 comments
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.


As a recruiter, I would check the following:

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


I think the suggestions above are good. I've Interviewed several candidates for PHP dev positions.

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.


I was doing a laravel project from tuts+ and you don't know how many times I had to check for stackoverflow for answers to problems. I was discouraged that I wouldn't fix some of my issues with the project but I was able to complete the project after a week, which made me happy.


Wow, thanks thats alot to learn in 2 days. But i'll commit to finding answers for that.


As an interviewer I would be checking first for competence over most other things. The reason is that PHP itself is a landmine language that has grown up organically. I'm not hating on PHP, just stating current state of the language. (Python is full of it's own gotcha's for example)

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 ?


I know another PHP developer that is well-known in the PHP community in DC - he told me a story about how he was a guest interviewer for another company as a courtesy once. Out of all of the candidates he interviewed, only one gave him straightforward, honest answers to the hard questions he asked - the answer was the same each time, "I don't know, I would google it". That was the candidate he selected, and supposedly it worked out great for that company.

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.


> I don't know, I would google it

That's exactly what I would answer and that would exactly be the reason why most companies won't hire me.


If you'd answer that for everything than it might be a red flag, but i think as long as you can demonstrate actual competence, at least enough to be able to judge the quality and merit of what you're googling, then it shouldn't be a problem.

Google and SO are too valuable not to use sometimes, and for PHP, php.net is almost unavoidable.


Well, depending on the job you should learn basics HTML and CSS. Even if you are not going to use them, showing the interviewers you expanded your view to the front end can only be a good thing. And since you have such few experience, you should compensate with a friendly personality.


As someone who bombed their first developer interview, do not get discouraged if you don't know the answer to a question. Make it clear you're willing to learn and what your current skill level is.

Good luck!


What kind of position is it? Even for a junior developer position two months of experience is very little.


It's junior developer position and its going to be a phone interview which should make things a bit easier.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: