Which of the following functions will allow identifying unique values inside an array?
Which of the following functions will allow identifying unique values inside an array?A . array_unique_valuesB . array_distinctC . array_count_valuesD . array_intersectE . array_valuesView AnswerAnswer: C
<?xml version=1.0'?
How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml? <?xml version=1.0'?> <foo> <bar> <baz id="l">One</baz> <baz id="2">Two</baz> </bar> </foo>A . $xml->getElementByld('2');B . $xml->foo->bar->baz[2]['id']C . $xml->foo->baz[2] ['id']D . $xml->foo->bar->baz[l]['id']E . $xml->bar->baz[l]['id']View AnswerAnswer: E
What is the output of the following code?
What is the output of the following code? try { } class MyException extends Exception {}; try { throw new MyException; } catch (Exception $e) { echo "1:"; throw $e; } catch (MyException $e) { echo "2:"; throw $e; } catch (Exception $e) { echo get_class($e); }A . A parser...
What is the outcome?
Consider the following table data and PHP code. 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); $cmd ="SELECT* FROM users WHERE id= :id"; $stmt...
Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?
Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?A . 'Hello, world!'B . function(){ alert("Hello, world!");}C . array{'Hello, world!')D . array('message' => 'Hello, world!')View AnswerAnswer: B
Your public web application needs to provide access to binary files for registered users only. How would you achieve this?
Your public web application needs to provide access to binary files for registered users only. How would you achieve this?A . Host the files on a public external file sharing service.B . Redirect to the file which resides in the server's document rootC . Use PHP to send the file...