Which of the following functions output text? | PHP MCQs

a. echo()
b. print()
c. println()
d. display()

Ans: a,b

Which of the following is correct with regard to echo and print? | PHP MCQs

a. echo is a construct and print is a function
b. echo is a function and print is a construct
c. Both are functions
d. Both are constructs

Ans: d

You need to count the number of parameters given in the URL by a POST operation. The correct way is: | PHP MCQs

a. count($POST_VARS);
b. count($POST_VARS_PARAM);
c. count($_POST);
d. count($HTTP_POST_PARAM);

Ans: c


In your PHP application you need to open a file. You want the application to issue a warning and continue execution, in case the file is not found. The ideal function to be used is: | PHP MCQs

a. include()
b. require()
c. nowarn()
d. getFile(false)

Ans: a


What will be the output of the following code? | PHP MCQs echo 30*5 . 7;

a. 150.7
b. 1507
c. 150.7
d. you can't concatenate integers
e. error will occur

Ans: b

Which of the following is not supported in PHP5? | PHP MCQs

a. Type Hinting
b. Reflection
c. Magic Methods
d. Multiple Inheritance
e. Object Cloning

Ans: d

Blogger news