Php programming language MCQ : Function and String : Link2

Php programming language MCQ : Function and String : Link2

Function and String MCQ

       Are you worried about the answers to PHP programming-Function and String-Default parameters, Variable function, Anonymous function questions? We have arranged the Show Answer button under the each question. Candidates can click on it to know the right option among the given alternatives. Furthermore, the applicants can check our web portal @ www.totalmcq.com to take part in more MCQ on various subject. Wish, the given information about the Function and String MCQ will helpful to the advance and can learn the various types of questions and answers.


Q.1. A function in PHP which starts with double underscore is known as -------.

A. Inbuilt Function                                                              B. Default Function
C. Magic Function                                                        D. User Defined Function

Q.2. Which of the following PHP function is used to generate unique id?

A. id()                                             B. mdid()
C. uniqueid()                                           D. None of the above

Q.3. Which of the following is the correct use of the strcmp() function in PHP?

A. The strcmp() function is used to compare the strings excluding case
B. The strcmp() function is used to compare the uppercase strings
C. The strcmp() function is used to compare the lowercase strings
D. The strcmp() function is used to compare the strings including case

Q.4. What is the use of fopen() function in PHP?

A. The fopen() function is used to open folders in PHP
B.The fopen() function is used to open remote server
C. The fopen() function is used to open files in PHP
None of the above

Q.5. What is the use of isset() function in PHP?

A.The isset() function is used to check whether variable is set or not
B.The isset() function is used to check whether the variable is free or not
C. The isset() function is used to check whether the variable is string or not
D. None of the above

Q.6. What is the use of sprintf() function in PHP?

A. The sprintf() function is used to print the output of program
B. The sprintf() function is used to send output to variable
C. Both of the above D. None of the above

Q.7. Which of the following function displays the information about PHP and its configuration?

A. php_info()                                                                           B. phpinfo()
C. info()                                                                       D. None of the above

Q.8. Which of the following function is used to get the ASCII value of a character in PHP?

A. val()
B. asc()
C. ascii()
D. chr()

Q.9. Which of the following function is used to unset a variable in PHP?

A. delete()                                                  B. unset()
C. unlink()                                                  D. None of the above

Q.10. Which of the following function in PHP can be used to test the type of any variable?

A. showtype()                                                                                B. gettype()
C. settype()                                                                             D. None of the above