New Year Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free Zend 200-550 Practice Exam with Questions & Answers | Set: 3

Questions 21

Which of these databases is NOT supported by a PDO driver?

Options:
A.

Microsoft SQL Server

B.

SQLite

C.

Microsoft Access

D.

Berkeley DB

Zend 200-550 Premium Access
Questions 22

Please provide the name of the super-global variable where all the information about cookies is available.

Options:
Questions 23

What can prevent PHP from being able to open a file on the hard drive (Choose 2)?

Options:
A.

File system permissions

B.

File is outside of open_basedir

C.

File is inside the /tmp directory.

D.

PHP is running in CGI mode.

Questions 24

Given a PHP value, which sample shows how to convert the value to JSON?

Options:
A.

$string = json_encode($value);

B.

$string = Json::encode($value);

C.

$json = new Json($value); $string = $json->__toString();

D.

$value = (object) $value; $string = $value->__toJson();

Questions 25

Is the following code vulnerable to SQL Injection ($mysqli is an instance of the MySQLi class)?

$age = $mysqli->real_escape_string($_GET['age']);

$name = $mysqli->real_escape_string($_GET['name']);

$query = "SELECT * FROM `table` WHERE name LIKE '$name' AND age = $age";

$results = $mysqli->query($query);

Options:
A.

No, the code is fully protected from SQL Injection.

B.

Yes, because the $name variable is improperly escaped.

C.

Yes, because the $name variable and the $age variable is improperly escaped.

D.

Yes, because the $age variable is improperly escaped.

E.

Yes, because you cannot prevent SQL Injection when using MySQLi

Questions 26

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?

Options:
A.

header()

B.

headers()

C.

headers_list()

D.

headers_sent()

E.

getresponseheaders()

Questions 27

Before the headers are sent, how can you remove a previously set header?

Options:
A.

Use the header_remove() function, providing the name of the header

B.

Use the die() function to abort the PHP script

C.

Not possible

D.

Use the headers_list() function, providing the name of the header as the second argument

Questions 28

What is the output of the following code?

class Foo Implements ArrayAccess {

function offsetExists($k) { return true;}

function offsetGet($k) {return 'a';}

function offsetSet($k, $v) {}

function offsetUnset($k) {}

}

$x = new Foo();

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

Options:
A.

true

B.

false

Questions 29

When a class is defined as final it:

Options:
A.

Can no longer be extended by other classes.

B.

Means methods in the class are not over-loadable.

C.

Cannot be defined as such, final is only applicable to object methods.

D.

Cannot be instantiated.

Questions 30

Which value will be assigned to the key 0 in this example?

$foo = array(true, '0' => false, false => true);

Options: