Leads4pass > Zend-Technologies > Zend > 200-710 > 200-710 Online Practice Questions and Answers

200-710 Online Practice Questions and Answers

Questions 4

Given a php.ini setting of

default_charset = utf-8

what will the following code print in the browser?

header('Content-Type: text/html; charset=iso-8859-1');

echo 'and#9986;and#10004;and#10013;';

A. Three Unicode characters, or unreadable text, depending on the browser

B. and#9986;and#10004;and#10013;

C. A blank line due to charset mismatch

Buy Now
Questions 5

What is the difference between "print" and "echo"?

A. There is no difference.

B. Print has a return value, echo does not

C. Echo has a return value, print does not

D. Print buffers the output, while echo does not

E. None of the above

Buy Now
Questions 6

What is "instanceof" an example of?

A. a boolean

B. an operator

C. a function

D. a language construct

E. a class magic

Buy Now
Questions 7

Consider the following table data and PHP code. What is the outcome?

Table data (table name "users" with primary key "id"):

id name email

1 anna [email protected]

2 betty [email protected]

3 clara [email protected]

5 sue [email protected]

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 {

$cmd = "INSERT INTO users (id, name, email) VALUES (:id, :name, :email)";

$stmt = $pdo->prepare($cmd);

$stmt->bindValue('id', 1);

$stmt->bindValue('name', 'anna');

$stmt->bindValue('email', '[email protected]');

$stmt->execute();

echo "Success!";

} catch (PDOException $e) {

echo "Failure!";

throw $e;

}

A. The INSERT will succeed and the user will see the "Success!" message.

B. The INSERT will fail because of a primary key violation, and the user will see the "Success!" message.

C. The INSERT will fail because of a primary key violation, and the user will see a PDO warning message.

D. The INSERT will fail because of a primary key violation, and the user will see the "Failure!" message.

Buy Now
Questions 8

What parsing methodology is utilized by the SimpleXML extension?

A. SAX

B. DOM

C. XPath

D. Push/Pull Approach

E. Expat

Buy Now
Questions 9

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.

Buy Now
Questions 10

Assuming UTF-8 encoding, what is the value of $count?

A. 0

B. 4

C. 5

D. 7

Buy Now
Questions 11

Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response or are ready to be sent?

A. header()

B. headers()

C. headers_list()

D. headers_sent()

E. getresponseheaders()

Buy Now
Questions 12

What is the output of the following code?

class Bar {

private $a = 'b';

public $c = 'd';

}

$x = (array) new Bar();

echo array_key_exists('a', $x) ? 'true' : 'false';

echo '-';

echo array_key_exists('c', $x) ? 'true' : 'false';

A. false-false

B. false-true

C. true-false

D. true-true

Buy Now
Questions 13

What is the preferred method for preventing SQL injection?

A. Always using prepared statements for all SQL queries.

B. Always using the available database-specific escaping functionality on all variables prior to building the SQL query.

C. Using addslashes() to escape variables to be used in a query.

D. Using htmlspecialchars() and the available database-specific escaping functionality to escape variables to be used in a query.

Buy Now
Exam Code: 200-710
Exam Name: Zend Certified Engineer
Last Update: Dec 16, 2024
Questions: 233
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99