PHP 11

COEP
Lets Crack Online Exam

IT Interview Exam Paper: PHP 11

Subject: PHP 11

Part 11: List for questions and answers of PHP

 

Q1. Which one of the following statements should be used to disable just the fopen(), and file() functions?

a) disable_functions = fopen(),file()

b) disable_functions = fopen,file

c) functions_disable = fopen(),file()

d) functions_disable = fopen,file

 

Q2. Which one of the following statements should be used to disable the use of two classes administrator and janitor?

a) disable_classes = “administrator, janitor”

b) disable_classes = class administrator, class janitor

c) disable_classes = class “administrator”, class “janitor”

d) disable_class = class “administrator”, class “janitor”

 

Q3. What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.

a) 10

b) 20

c) 30

d) 40

 

Q4. The memory_limit is only applicable if ___ is enabled when you configure PHP. Fill in the blank.

a) –enable-limit

b) -enable-memory-limit

c) –enable-memory-limit

d) -memory-limit

 

Q5. Suppose all web material is located within the directory /home/www. To prevent users from viewing and manipulating files such as /etc/password, which one of the following statements should you use?

a) open_dir = “/home/www/”

b) open_dir = /home/www/

c) open_basedir = /home/www/

d) open_basedir = “/home/www/” 

 

Q6. Which Apache directive outputs Apache’s server version, server name, port and compile-in modules?

a) ServerSignature

b) ServerName

c) ServerDetails

d) ServerInfo

 

Q7. Which directive determines which degree of server details is provided if the ServerSignature directive is enabled?

a) ServerAddons

b) ServerExtra

c) ServerTokens

d) ServerDetails

 

Q8. Which directive should we disable to obscure the fact that PHP is being used on our server?

a) show_php

b) expose_php

c) print_php

d) info_php

 

Q9. Say I want to change the extension of a PHP file, which of the following statements should I edit to change from .php to .html in the httpd.conf file?

a) AddType application/x-httpd-php .php

b) AddType application/x-httpd-php .asp

c) AddType application/x-httpd-asp .php

d) AddType application/x-httpd-asp .asp

 

Q10. The developers of PHP deprecated the safe mode feature as of which PHP version.

a) PHP 5.1.0

b) PHP 5.2.0

c) PHP 5.3.0

d) PHP 5.3.1

 

Q11. What will be the output if we replace the line $num = preg_grep(“/[0-5]/”, $number); with $num = preg_grep(“/[0-5]/”, $number, PREG_GREP_INVERT);?

a) Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5)

b) Array([2]=>two [3]=>three [4]=>four)

c) Array([1]=> 1)

d) Array([0]=>0 [5]=>5) 

 

Q12. Which one of the following functions is used to search a string?

a) preg_match

b) preg_search

c) preg_find

d) preg_found

 

Q13. Which one of the following preg PHP function is used to do a find and replace on a string or an array?

a) preg_replace()

b) preg_find()

c) preg_find_replace()

d) preg_findre()

 

Q14. Which one of the following preg PHP functions is used to take a string, and put it in an array?

a) preg_destroy()

b) preg_split()

c) preg_unchain()

d) preg_divide()

 

Q15. Which one of the following is not a preg PHP function?

a) preg_match

b) preg_match_all

c) preg_matchall

d) preg_split

 

Q16. PHP variables are

a) Multitype variables

b) Double type variables

c) Single type variable

d) Trible type variables

 

Q17. Is php can support multiple inheritance?

a) yes

b) NO

c) not determined

d) none of the above 

 

Q18. Which of the following is used to check if a function has already been defined?

a) bool function_exists(functionname)

b) bool f_exists(functionname)

c) bool func_exist(functioname)

d) none of these

 

Q19. $str=”3dollars”; $a=20; $a+=$str; print($a); ?> Output ?

a) 23dollars

b) 203dollars

c) 320dollars

d) 23

 

Q20. Parameter flags was added in which version of PHP?

a) PHP 4.0

b) PHP 4.1

c) PHP 4.2

d) PHP 4.3 

 

Part 11: List for questions and answers of PHP

 

Q1. Answer: b

 

Q2. Answer: a

 

Q3. Answer: c

 

Q4. Answer: c

 

Q5. Answer: d

 

Q6. Answer: a

 

Q7. Answer: c

 

Q8. Answer: b

 

Q9. Answer: a

 

Q10. Answer: c

 

Q11. Answer: b

 

Q12. Answer: a

 

Q13. Answer: a

 

Q14. Answer: b

 

Q15. Answer: c

 

Q16. Answer: a

 

Q17. Answer: b

 

Q18. Answer: a

 

Q19. Answer: d

 

Q20. Answer: d