php mcq questions with answers


                                
Which of the following rules must every correct XML document adhere to? (Choose 2)
A.It has to be well-formed.
B.It has to be valid.
C.It has to be associated to a DT
D.D. It may only contain UTF-8 encoded characters.
                                
Given the following code, what is correct? function f(stdClass &$x = NULL) { $x = 42; } $z = new stdClass; f($z); var_dump($z);
A.Error: Typehints cannot be NULL
B.Error: Typehints cannot be references
C.Result is NULL
D.Result is object of type stdClass
E.Result is 42
                                
The function mysqli_affected_rows() can be used to perform which of the following actions? (Choose 2)
A.get the number of rows that are affected by SELECT statements
B.get the number of rows that are affected by UPDATE statements
C.get the number of rows that are affected by INSERT statements
D.get the number of rows in a result set
E.get the numbers of rows that are affected after committing a transaction using COMMIT
                                
How can a SimpleXML object be converted to a DOM object?
A.dom_import_simplexml()
B.dom_export_simplexml()
C.simplexml_import_dom()
D.SimpleXML2Dom()
E.None of the above.
                                
REST is a(n) ...
A.Web service protocol similar to SOAP with a strict XML schema.
B.Principle to exchange information using XML and HTTP.
C.API to get information from social networking sites.