Which of the following statements about PHP is false? (Choose 2)
Which of the following statements about PHP is false? (Choose 2)A . A final class can be derived.B . A final class may be instantiated.C . A class with a final function may be derived.D . Static functions can be final.E . Properties can be final.View AnswerAnswer: A, E
What is the outcome?
Consider the following table data and PHP code, and assume that the database supports transactions. What is the outcome? Table data (table name "users" with primary key "id"): PHP code (assume the PDO connection is correctly established): $dsn = 'mysql:host=localhost;dbname=exam'; $user= 'username'; $pass='********'; $pdo = new PDO($dsn, $user, $pass); try...
Which of these databases is NOT supported by a PDO driver?
Which of these databases is NOT supported by a PDO driver?A . Microsoft SQL ServerB . SQLiteC . Microsoft AccessD . Berkeley DBView AnswerAnswer: D
What super-global should be used to access information about uploaded files via a POST request?
What super-global should be used to access information about uploaded files via a POST request?A . $_SERVERB . $_ENVC . $_POSTD . $ FILES E: $_GETView AnswerAnswer: D
What is the output of the following code?
What is the output of the following code? class a { public $val; function renderVal (a $a) { if ($a) { echo $a->val; renderVal (null);A . A syntax error in the function declaration lineB . An error, because null is not an instance of 'a'C . Nothing, because a null...
How can you determine whether a PHP script has already sent cookies to the client?
How can you determine whether a PHP script has already sent cookies to the client?A . Use $_COOKIEB . Use the getcookie() functionC . Use the headers_sent() functionD . Use JavaScript to send a second HTTP requestView AnswerAnswer: C
$result= $valuel ???
Consider the following code: $result= $valuel ??? $value2; Which operator needs to be used instead of??? so that $result equals $valuel if $valuel evaluates to true, and equals $value2 otherwise? Just state the operator as it would be required in the code.View AnswerAnswer: ?:
Which of the following parts must a XML document have in order to be well-formed?
Which of the following parts must a XML document have in order to be well-formed?A . An XML declarationB . A root elementC . A specified encodingD . A reference to either a DTD or an XML schema definitionView AnswerAnswer: B
Which of the following techniques ensures that a value submitted in a form can only be yes or no?
Which of the following techniques ensures that a value submitted in a form can only be yes or no?A . Use a select list that only lets the user choose between yes and no.B . Use a hidden input field that has a value of yes or no.C . Enable...
Which of the following may be used in conjunction with CASE inside a SWITCH statement?
Which of the following may be used in conjunction with CASE inside a SWITCH statement?A . A scalarB . An expressionC . A booleanD . All of the aboveView AnswerAnswer: D