Skip to content

PHP Interview Questions

Prashant edited this page Nov 10, 2019 · 1 revision

How can we get the IP address of the client?
This question might show you how playful and creative the candidate is because there are many options. $_SERVER["REMOTE_ADDR"]; is the easiest solution, but the candidate can write x line scripts for this question.

What’s the difference between the include() and require() functions?
They both include a specific file but on require the process exits with a fatal error if the file can’t be included, while include statement may still pass and jump to the next step in the execution.

Clone this wiki locally