Most Important PHP Interview Questions and Answers
Question:
What’s the difference between the include() and require() ?
Answer:
The Purpose of both is include() and require() is "to include a specific file"
The require() function is identical to include(), except that it handles errors differently. If an error occurs, the include() function generates a warning, but the script will continue execution. The require() generates a fatal error, and the script will stop.
Question:
How can we get the IP address of the client?
Answer:
$_SERVER["REMOTE_ADDR"]; gives the IP address from which the request was sent to the web server
Question:
Is multiple inheritance supported in PHP ?
Answer:
NO, multiple inheritance is not supported by PHP
Question:
What is the difference between unset and unlink ?
Answer:
unlink is used to remove/delete files.
unset is used to unset a variable
PHP Interview Questions and Answers |
What’s the difference between the include() and require() ?
Answer:
The Purpose of both is include() and require() is "to include a specific file"
The require() function is identical to include(), except that it handles errors differently. If an error occurs, the include() function generates a warning, but the script will continue execution. The require() generates a fatal error, and the script will stop.
Question:
How can we get the IP address of the client?
Answer:
$_SERVER["REMOTE_ADDR"]; gives the IP address from which the request was sent to the web server
Question:
Is multiple inheritance supported in PHP ?
Answer:
NO, multiple inheritance is not supported by PHP
Question:
What is the difference between unset and unlink ?
Answer:
unlink is used to remove/delete files.
unset is used to unset a variable
Well hello there! It was so fantastic to visit your blog and to read the article.
ReplyDeleteRecommended you read