Monday, February 29, 2016

Interview Questions - 1 - PHP - Answers



Back- Interview Questions -1

Q1. Ans: define() directive, like define ("MYCONSTANT", 100);

Q2. Ans: Put an ampersand in front of it, like $a = &$b

Q3. Ans: Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.

Q4. Ans: It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.

Q5. Ans: The output is displayed directly to the browser.






No comments:

Post a Comment