As part of a new series of posts I will be creating a set of PHP questions suitable for use in interviews or just for fun. They will range from the very easy to very difficult but are all designed to test one or two specific parts of the PHP language. The idea is not to test for knowledge of the order of PHP function parameters (which I often have to look up), but more to test if the candidate knows how the language works. It is also quite a good mechanism to post about some of the fundamentals of the PHP language.
The basic format of the question posts will be the question at the top, followed by a bit of white space before the the answer. Having this white space is so that you can have a little think about the question before being dropped into the answer, but also avoids having to open any hidden areas or anything like that. The answer to the question won't just state what is correct, but also why it is correct and also any points that you should be thinking about in addition to the information given. Each section will have headings to show which is bit is which.
Feel free to take these questions and use them in your own interviews.
I have created a new category to store these questions in and will be updating this post as and when I add more questions to that category.
Enjoying this series Phil, very interesting.
Glad to hear it Pete! I have to admit that I have learnt one or two things whilst I was writing the answers. :)