php mcq questions with answers


                                
Which of the following is correct? (Choose 2) 1) A class can extend more than one class. 2) A class can implement more than one class. 3) A class can extend more than one interface. 4) A class can implement more than one interface. 5) An interface can extend more than one interface. 6) An interface can implement more than one interface.
A.1)
B.2)
C.3)
D.4)
E.5)
F.6)
                                
Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?
A.TRUE
B.FALSE
C.ENT_QUOTES
D.ENT_NOQUOTES
E.ENT_COMPAT
                                
What is the output of the following code? echo 0x33, ' monkeys sit on ', 011, ' trees.';
A.33 monkeys sit on 11 trees.
B.51 monkeys sit on 9 trees.
C.monkeys sit on trees.
D.0x33 monkeys sit on 011 trees.
                                
Transactions are used to:
A.guarantee high performance
B.secure data consistency
C.secure access to the database
D.reduce the database server overhead
E.reduce code size in PHP
                                
What does the __FILE__ constant contain?
A.The filename of the current script.
B.The full path to the current script.
C.The URL of the request made.
D.The path to the main script.