DEV Community

Discussion on: 45 Important PHP Interview Questions That May Land You a Job

Collapse
 
oleksiirybin profile image
oleksii-rybin • Edited

Pretty nice questions to refresh some knowledge. And some of the questions I didn't know the answers to, so got some new information here :)

But some of the questions I'd like to comment on:

The answer to question #15 might be misleading because when you pass a variable by value, it means that the copy of the variable is created and any changes you do with this copy does not affect the initial variable, which is not the case with PHP objects. php.net/manual/en/language.oop5.re...

As for question #16, the provided answer is pretty vague, instead of it, I'd just use the answer from question #1 since it is the same thing.

Q#34 (Explain function call by reference) sounds weird, I don't like the way this question is put. Correct me if I'm wrong, but instead of "call a function by reference", it should be "pass the function parameters by reference".