PHP 19

COEP
Lets Crack Online Exam

IT Interview Exam Paper: PHP 19

Subject: PHP 19

Part 19: List for questions and answers of PHP

 

Q1. Trace the odd data type

a) floats

b) integer

c) doubles

d) Real number

 

Q2. Which of the following are valid float values?

a) 4.5678

b) 4.0

c) 7e4

d) All of above

 

Q3. In php string data are

a) delimited by single quote

b) delimited by double quote

c) delimited by <<< identifier

d) All of above

 

Q4. Which of the following delimiting method is known as string Interpolation

a) delimited by single quote

b) delimited by double quote

c) delimited by <<< identifier

d) All of above

 

Q5. Which datatypes are treaded as arrays

a) Integer

b) Float

c) String

d) Booleans

 

Q6. Which of following are compound data type?

a) Array

b) Objects

c) Both

d) None 

 

Q7. Casting operator introduced in PHP 6 is

a) (array)

b) (int64)

c) (real) or (double) or (float)

d) (object)

 

Q8. When defining identifier in PHP you should remember that

a) Identifier are case sensitive. So $result is different than $ result

b) Identifiers can be any length

c) Both of above

d) None of above

 

Q9. Identify the invalid identifier

a) my-function

b) size

c) –some word

d) This&that

 

Q10. Which of folowiing variable assignment is ‘by value’ assignment in PHP

a) $value1= $value?

b) $value1= & $value?

c) $value1= & $value?

d) None

 

Q11. Identify the variable scope that is not supported by PHP

a) Local variables

b) Function parameters

c) Hidden variables

d) Global variables

 

Q12. Variable scope on which a variable does not loose its value when the function exists and use that value if the function is called again is:

a) Local

b) function parameter

c) static

d) None of above 

 

Q13. The left association operator % is used in PHP for

a) percentage

b) bitwise or

c) division

d) modulus

 

Q14. The left associative dot operator (.) is used in PHP for

a) multiplication

b) concatenation

c) separate object and its member

d) delimeter

 

Q15. Which of the following functions require the allow-url-fopen must be enabled?

a) include()

b) require()

c) both of above

d) None of above

 

Q16. Which function includes the specified file even the statement evaluates to false in which block the function is placed.

a) include ()

b) require ()

c) both of above

d) None of above

 

Q17. On failure of which statement the script execution stops displaying error/warning message?

a) rinclude ()

b) require ()

c) both of above

d) None of above

 

Q18. In PHP, during error handling include() generates………………….

a) a fatal error, and the script will stop

b) a warning, but the script will continue execution

c) None of the above 

 

Q19. PHP is a _____ . It means you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.

a) client side language

b) local language

c) global language

d) loosely typed language

 

Q20. Trace the function that does continue the script execution even if the file inclusion fails

a) include ()

b) require ()

c) both of above

d) None of above 

 

Part 19: List for questions and answers of PHP

 

Q1. Answer: b

 

Q2. Answer: d

 

Q3. Answer: d

 

Q4. Answer: c

 

Q5. Answer: c

 

Q6. Answer: c

 

Q7. Answer: b

 

Q8. Answer: c

 

Q9. Answer: d

 

Q10. Answer: a

 

Q11. Answer: c

 

Q12. Answer: c

 

Q13. Answer: d

 

Q14. Answer: b

 

Q15. Answer: c

 

Q16. Answer: b

 

Q17. Answer: b

 

Q18. Answer: a

 

Q19. Answer: d

 

Q20. Answer: a