Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Zend Certified PHP Engineer

Last Update 6 hours ago Total Questions : 223

The Zend Certified PHP Engineer content is now fully updated, with all current exam questions added 6 hours ago. Deciding to include 200-550 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our 200-550 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these 200-550 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Zend Certified PHP Engineer practice test comfortably within the allotted time.

Question # 11

Which of the following statements is true?

A.

All PHP database extensions support prepared statements

B.

All PHP database extensions come with their own special helper functions to escape user data to be used in dynamic SQL queries

C.

All PHP database extensions provide an OOP interface

D.

All PHP database extensions appear in the output of php -m , if installed and enabled

Question # 12

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.

Question # 13

What is the output of the following code?

var_dump(boolval([]));

A.

bool(true)

B.

bool(false)

Question # 14

After performing the following operations:

$a = array('a', 'b', 'c');

$a = array_keys(array_flip($a));

What will be the value of $a?

A.

array('c', 'b', 'a')

B.

array(2, 1, 0)

C.

array('a', 'b', 'c')

D.

None of the above

Question # 15

What is the name of the PHP function used to automatically load non-yet defined classes?

A.

autoload()

B.

__autoload()

C.

__catch()

D.

load()

E.

loadClass()

Question # 16

Please provide the value of the $code variable in the following statement to set an HTTP status code that signifies that the requested resource was not found.

http_response_code($code);

Question # 17

Given the following code, how can we use both traits A and B in the same class? (select all that apply)

trait A {

public function hello() {

return "hello";

}

public function world() {

return "world";

}

}

trait B {

public function hello() {

return "Hello";

}

public function person($name) {

return ":$name";

}

}

A.

Rename the A::hello() method to a different name using A::hello as helloA;

B.

Use B::hello() instead of A 's version using B::hello insteadof A

C.

Use B::hello() instead of A 's version using use B::hello

D.

Rename the A::hello() method to a different name using A::hello renameto helloA;

E.

None of the above (both can be used directly)

Question # 18

What is the output of the following code?

function increment ($val)

{

$_GET['m'] = (int) $_GET['m'] + 1;

}

$_GET['m'] = 1;

echo $_GET['m'];

Question # 19

What is the output of the following code?

function z($x) {

return function ($y) use ($x) {

return str_repeat($y, $x);

};

}

$a = z(2);

$b = z(3);

echo $a(3) . $b(2);

A.

22333

B.

33222

C.

33322

D.

222333

Question # 20

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"):

id name email

------- ----------- -------------------

1 anna alpha@example.com

2 betty beta@example.org

3 clara gamma@example.net

5 sue sigma@example.info

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 {

$pdo- > exec("INSERT INTO users (id, name, email) VALUES (6, 'bill', 'delta@example.com')");

$pdo- > begin();

$pdo- > exec("INSERT INTO users (id, name, email) VALUES (7, 'john', 'epsilon@example.com')");

throw new Exception();

} catch (Exception $e) {

$pdo- > rollBack();

}

A.

The user 'bill' will be inserted, but the user 'john' will not be.

B.

Both user 'bill' and user 'john' will be inserted.

C.

Neither user 'bill' nor user 'john' will be inserted.

D.

The user 'bill' will not be inserted, but the user 'john' will be.

Go to page: