Exclusive Black Friday Deal: 70% Off All Exam Bundles! Use coupon code below to unlock your savings! - Ends in 0d 00h 00m 00s - Coupon code: Friday70

Free Zend Certified PHP Engineer Practice Questions

Question # 31

Late static binding is used in PHP to:

Options:

A.  

Load dynamic libraries and extensions at runtime

B.  

Use caller class information provided in static method call

C.  

Resolve undefined class names by automatically including needed files

D.  

Find proper method to call according to the call arguments

Discussion 0
Question # 32

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

Discussion 0
Question # 33

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);

Options:

A.  

22333

B.  

33222

C.  

33322

D.  

222333

Discussion 0

200-550 PDF

200-550 PDF (Printable)
$46.5
$154.99

200-550 Testing Engine

200-550 PDF (Printable)
$51
$169.99

200-550 PDF + Testing Engine

200-550 PDF (Printable)
$63.9
$212.99

Free Exams Sample Questions